Fix punctuation bug

修复顿号和英文冒号停顿和分句的问题
pull/1262/head
JiehangXie 3 years ago
parent 6065b1b607
commit d88ceef7bc

@ -51,7 +51,7 @@ from .quantifier import replace_temperature
class TextNormalizer():
def __init__(self):
self.SENTENCE_SPLITOR = re.compile(r'([:、,;。?!,;?!][”’]?)')
self.SENTENCE_SPLITOR = re.compile(r'([、,;。?!,;?:!][”’]?)')
def _split(self, text: str, lang="zh") -> List[str]:
"""Split long text into sentences with sentence-splitting punctuations.

Loading…
Cancel
Save