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

jeremy886 opened this Issue Feb 3, 2015 · 3 comments


None yet
2 participants

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.
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.


This comment has been minimized.


mozillazg commented Feb 4, 2015

@jeremy886 苹果 有的网站pín guǒ, 有的是 píng guǒ,手边没有《现代汉语词典》不知道哪个是对的。


This comment has been minimized.

jeremy886 commented Feb 6, 2015

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


This comment has been minimized.


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