Spaces:
Running
on
Zero
Running
on
Zero
mrfakename
commited on
Commit
•
03572f6
1
Parent(s):
b8401e1
Enhancements
Browse files- melo/split_utils.py +1 -1
melo/split_utils.py
CHANGED
@@ -18,7 +18,7 @@ def split_sentences_latin(text, min_len=10):
|
|
18 |
text = re.sub('[“”]', '"', text)
|
19 |
text = re.sub('[‘’]', "'", text)
|
20 |
text = re.sub(r"[\<\>\(\)\[\]\"\«\»]+", "", text)
|
21 |
-
return txtsplit(text, 512, 512)
|
22 |
# 将文本中的换行符、空格和制表符替换为空格
|
23 |
# text = re.sub('[\n\t ]+', ' ', text)
|
24 |
# # 在标点符号后添加一个空格
|
|
|
18 |
text = re.sub('[“”]', '"', text)
|
19 |
text = re.sub('[‘’]', "'", text)
|
20 |
text = re.sub(r"[\<\>\(\)\[\]\"\«\»]+", "", text)
|
21 |
+
return [item.strip() for item in txtsplit(text, 512, 512) if item.strip()]
|
22 |
# 将文本中的换行符、空格和制表符替换为空格
|
23 |
# text = re.sub('[\n\t ]+', ' ', text)
|
24 |
# # 在标点符号后添加一个空格
|