bugfix
This commit is contained in:
parent
c5ba06f4d7
commit
6494f67568
@ -15,12 +15,6 @@ def split_english_sentences(text):
|
||||
sentences = [s.replace('<DOT>', '.') 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'))
|
||||
|
Loading…
Reference in New Issue
Block a user