def _splitting_functions(split_by: str, language: str='english') -> FunctionType:
    """_summary_
    selects a text splitting function based on the method provided by 'split_by'
    Args:
        split_by (str): method to split the text by, 'character', 'word', 'sentence', 'passage'
                        if not one of those allows for custom characters to split on
        language (str, optional): _description_. Defaults to 'english'.

    Raises:
        TypeError: _description_

    Returns:
        _type_: function for splitting text based on the method provided 
    """
    if not isinstance(split_by, str):
        raise TypeError(f"expected str received {type(split_by)}")

    MAPPING = {
        'character':list,
        'word': partial(word_tokenize, language=language),
        'sentence':partial(sent_tokenize, language=language),
        'passage':lambda x:x.split("\n\n")
    }

    if split_by in MAPPING:
        return MAPPING[split_by]
    
    # can also have a custom split but leave that for now
    raise KeyError(f"unexpected split_by type of {split_by}")
_summary_
    selects a text splitting function based on the method provided by 'split_by'
    Args:
        split_by (str): method to split the text by, 'character', 'word', 'sentence', 'passage'
                        if not one of those allows for custom characters to split on
        language (str, optional): _description_. Defaults to 'english'.

    Raises:
        TypeError: _description_

    Returns:
        _type_: function for splitting text based on the method provided 
    
src/marqo/s2_inference/processing/text.py