fix tone bug about 3 chinese chars have two tone5, test=tts

pull/2369/head
david.95 3 years ago
parent 232ab1958a
commit 8e2aee7b5e

@ -157,7 +157,7 @@ class ToneSandhi():
def _split_word(self, word: str) -> List[str]:
if len(word) == 3 and word[
-1:] == '': # three chars, like 老头子,the second char tone should not be 5
-1:] == '': # three chars, like 老头子,the second char tone should not be 5
return [word]
word_list = jieba.cut_for_search(word)
word_list = sorted(word_list, key=lambda i: len(i), reverse=False)

Loading…
Cancel
Save