未验证 提交 5d5888af 编写于 作者: 小湉湉's avatar 小湉湉 提交者: GitHub

fix tone, update readme (#2335)

上级 cb748039
......@@ -12,13 +12,13 @@ Run the command below to get the results of the test.
./run.sh
```
The `avg WER` of g2p is: 0.024169315564825305
The `avg WER` of g2p is: 0.024075726733983775
```text
,--------------------------------------------------------------------.
| ./exp/g2p/text.g2p |
|--------------------------------------------------------------------|
| SPKR | # Snt # Wrd | Corr Sub Del Ins Err S.Err |
| Sum/Avg| 9996 299181 | 97.6 2.4 0.0 0.0 2.4 49.2 |
| Sum/Avg| 9996 299181 | 97.6 2.4 0.0 0.0 2.4 49.0 |
`--------------------------------------------------------------------'
```
......@@ -84,9 +84,7 @@ 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 '好是帅酷棒衰烂臭狗糗' and
word[-1] == '额') or (len(word) == 1 and word[-1] in "额嗯"):
if 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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册