def split_by_sentence_tokenizer_internal(text: str, tokenizer: Any) -> List[str]:
    """
    Get the spans and then return the sentences.

    Using the start index of each span
    Instead of using end, use the start of the next span if available
    """
    spans = list(tokenizer.span_tokenize(text))
    sentences = []
    for i, span in enumerate(spans):
        start = span[0]
        if i < len(spans) - 1:
            end = spans[i + 1][0]
        else:
            end = len(text)
        sentences.append(text[start:end])
    return sentences

    Get the spans and then return the sentences.

    Using the start index of each span
    Instead of using end, use the start of the next span if available
    
llama-index-core/llama_index/core/node_parser/text/utils.py