-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pinyin-utf8.dat 里面的 5 是什么意思 #19
Comments
@hongliang-goudou 这个是你转换的,知道是什么原因吗? |
@flyerhzm 并不是转换的问题,是 Mandarin.dat 里面 5 |
@flyerhzm 恩,刚才回头补了下汉语拼音也发现了,但是 5 应该改成 0 才可以,或者把调整一下 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tone_index 1 2 3 4 分别是 4 个声,5 是什么?而且有 91 个有 5.
如果
tone_index
是 5 的话,下面代码就会出错代码来自 (https://github.com/flyerhzm/chinese_pinyin/blob/master/lib/chinese_pinyin.rb#L86-L90)
因为每个
TONE_MARK[v.to_sym]
都只有 5 个元素,因此会取到nil
,再进行tr!
就会报错。有些字的第一个拼音的
tone
不是 5,所以不会出问题。但也有不少字的第一个拼音的tone
是 5,awk '$2~/5/{print $1,$2}' data/pinyin-utf8.dat 㟷 da5 了 le5 们 men5 們 men5 吗 ma5 吧 ba5 吶 ne5 呗 bei5 哟 yo5
这些字转成拼音都会报错.
The text was updated successfully, but these errors were encountered: