Skip to content
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

多音字是个难题 #6

Closed
ghost opened this issue Feb 10, 2019 · 3 comments
Closed

多音字是个难题 #6

ghost opened this issue Feb 10, 2019 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 10, 2019

谢谢你开发的这个工具,非常好用,准备给领导推荐。
发现一个问题,多音字怎么转换啊,比如你举的例子:

library('pinyin')
mypy <- pydic() # 载入默认字典
py("春眠不觉晓,处处闻啼鸟", dic = mypy) # 转换

结果是:
"chūn_mián_bú_jiào_xiǎo_,_chǔ_chǔ_wén_tí_diǎo"

觉 是多音字,应该读作 jué,怎么解决?谢谢!

@pzhaonet
Copy link
Owner

这个问题目前本包没法解决:它没学过中文,不懂从语境判断多音字的读音。它用的是一个变通的办法:用户自制字典,用 load_dic() 载入自己的字典即可。

@ghost
Copy link
Author

ghost commented Feb 11, 2019

理解。谢谢你开发的这个工具。领导在中学教中文,以前一直在用微软word里面的自动转换功能,准备推荐她用用这个。

@pzhaonet
Copy link
Owner

Word 应该能更好地处理多音字吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant