|
|
|
@ -84,7 +84,9 @@ class ToneSandhi():
|
|
|
|
|
if j - 1 >= 0 and item == word[j - 1] and pos[0] in {"n", "v", "a"}:
|
|
|
|
|
finals[j] = finals[j][:-1] + "5"
|
|
|
|
|
ge_idx = word.find("个")
|
|
|
|
|
if (len(word) > 1 and word[-1] in "吧呢啊呐噻嘛吖嗨呐哦哒滴哩哟喽啰耶喔诶") or (len(word)>1 and word[-2] in '好是帅酷棒衰烂臭狗糗') or (len(word)==1 and word[-1] in "额嗯"):
|
|
|
|
|
if (len(word) > 1 and word[-1] in "吧呢啊呐噻嘛吖嗨呐哦哒滴哩哟喽啰耶喔诶") or (
|
|
|
|
|
len(word) > 1 and word[-2] in '好是帅酷棒衰烂臭狗糗' and word[-1]=='额') or (
|
|
|
|
|
len(word) == 1 and word[-1] in "额嗯"):
|
|
|
|
|
finals[-1] = finals[-1][:-1] + "5"
|
|
|
|
|
elif len(word) >= 1 and word[-1] in "的地得":
|
|
|
|
|
finals[-1] = finals[-1][:-1] + "5"
|
|
|
|
@ -347,7 +349,7 @@ class ToneSandhi():
|
|
|
|
|
|
|
|
|
|
def modified_tone(self, word: str, pos: str,
|
|
|
|
|
finals: List[str]) -> List[str]:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
finals = self._bu_sandhi(word, finals)
|
|
|
|
|
finals = self._yi_sandhi(word, finals)
|
|
|
|
|
finals = self._neural_sandhi(word, pos, finals)
|
|
|
|
|