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

maybe a bug - 苹果 => pin guo #11

Closed
jeremy886 opened this issue Feb 3, 2015 · 3 comments
Closed

maybe a bug - 苹果 => pin guo #11

jeremy886 opened this issue Feb 3, 2015 · 3 comments
Labels

Comments

@jeremy886
Copy link

@jeremy886 jeremy886 commented Feb 3, 2015

import pypinyin
zi = '苹果'
py = pypinyin.slug(zi, style=pypinyin.NORMAL, separator=' ')
Building Trie..., from /usr/local/lib/python3.4/site-packages/jieba/dict.txt
loading model from cache /var/folders/k9/47fd1ycj2rg19gn7d2g5g16c0000gn/T/jieba.cache
loading model cost 2.451965808868408 seconds.
Trie has been built succesfully.
print(py)
pin guo

What I was looking for is "ping guo".

Do we use a conversion table in python-pinyin? I probably should search for it before asking. If yes, I'm interested in this table.

@mozillazg
Copy link
Owner

@mozillazg mozillazg commented Feb 4, 2015

@jeremy886 苹果 有的网站pín guǒ, 有的是 píng guǒ,手边没有《现代汉语词典》不知道哪个是对的。
字的读音在这里:https://github.com/mozillazg/python-pinyin/blob/master/pypinyin/pinyin_dict.py
词的读音在这里:https://github.com/mozillazg/python-pinyin/blob/master/pypinyin/phrases_dict.py

@jeremy886
Copy link
Author

@jeremy886 jeremy886 commented Feb 6, 2015

我在墨尔本中学教汉语,手上的书和字典的苹果都是píng guǒ。需要我帮忙修改吗?

@mozillazg
Copy link
Owner

@mozillazg mozillazg commented Feb 7, 2015

@jeremy886 谢谢!已改。

In [3]: pypinyin.lazy_pinyin(u'苹果', pypinyin.TONE2)
Out[3]: [u'pi2ng', u'guo3']

In [4]: pypinyin.lazy_pinyin(u'金苹果', pypinyin.TONE2)
Out[4]: [u'ji1n', u'pi2ng', u'guo3']

@mozillazg mozillazg added the bug label Feb 7, 2015
@mozillazg mozillazg closed this in 07a6b38 Feb 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants