diff --git a/appPublic/textsplit.py b/appPublic/textsplit.py index c569393..d2116d0 100644 --- a/appPublic/textsplit.py +++ b/appPublic/textsplit.py @@ -15,12 +15,6 @@ def split_english_sentences(text): sentences = [s.replace('', '.') for s in sentences if s.strip()] return sentences -def split_engish1_sentences(text): - # 匹配以 '. ', '? ', '! ' 结尾的英文句子,保留分隔符 - sentence_endings = re.compile(r'(?<=[.!?]) +') - sentences = sentence_endings.split(text.strip()) - return [s.strip() for s in sentences if s.strip()] - def split_text_with_dialog_preserved(text): # 正则匹配中英文引号对话 text = ' '.join(text.split('\n'))