From 272005c7f48a0bf4d4c26d50096186fa24bcb996 Mon Sep 17 00:00:00 2001 From: "Kyle P. Johnson" Date: Sat, 9 Mar 2024 11:36:31 -0800 Subject: [PATCH] Update split() to return list of lists --- semantic_split/splitters/SimilarSentenceSplitter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/semantic_split/splitters/SimilarSentenceSplitter.py b/semantic_split/splitters/SimilarSentenceSplitter.py index bcaa794..e9636ce 100644 --- a/semantic_split/splitters/SimilarSentenceSplitter.py +++ b/semantic_split/splitters/SimilarSentenceSplitter.py @@ -11,7 +11,7 @@ def __init__(self, similarity_model, sentence_splitter: Splitter): self.model = similarity_model self.sentence_splitter = sentence_splitter - def split(self, text: str, group_max_sentences=5) -> List[str]: + def split(self, text: str, group_max_sentences=5) -> List[List[str]]: ''' group_max_sentences: The maximum number of sentences in a group. ''' @@ -36,4 +36,4 @@ def split(self, text: str, group_max_sentences=5) -> List[str]: else: groups.append([sentences[i]]) - return groups \ No newline at end of file + return groups