def _split_text(self, text: str) -> List[str]:
        """
        _Split incoming text and return chunks with overlap size.

        Has a preference for complete sentences, phrases, and minimal overlap.
        """
        # Splitting the essay on '.', '?', and '!'
        single_sentences_list = re.split(r"(?<=[.?!])\s+", text)
        sentences = [
            {"sentence": x, "index": i} for i, x in enumerate(single_sentences_list)
        ]

        combined_sentences = combine_sentences(sentences, self.buffer_size)

        # compute embeddings
        embeddings = self.embed_model.get_text_embedding_batch(
            [x["combined_sentence"] for x in combined_sentences]
        )
        # assign embeddings to the sentences
        for i, embedding in enumerate(embeddings):
            combined_sentences[i]["embedding"] = embedding

        # calculate cosine distance between adjacent sentences
        distances = calculate_cosine_distances(combined_sentences)
        for i, distance in enumerate(distances):
            combined_sentences[i]["dist_to_next"] = distance

        # get indices above threshold
        indices_above_thresh = get_indices_above_threshold(
            distances, self.breakpoint_percentile_threshold
        )

        # make chunks
        return make_chunks(combined_sentences, indices_above_thresh)

        _Split incoming text and return chunks with overlap size.

        Has a preference for complete sentences, phrases, and minimal overlap.
        
llama-index-packs/llama-index-packs-node-parser-semantic-chunking/llama_index/packs/node_parser_semantic_chunking/base.py