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

拼音顺序颠倒问题 #122

Closed
zhouygg opened this issue Feb 11, 2018 · 1 comment
Closed

拼音顺序颠倒问题 #122

zhouygg opened this issue Feb 11, 2018 · 1 comment
Labels
Milestone

Comments

@zhouygg
Copy link

zhouygg commented Feb 11, 2018

运行环境

  • 操作系统(Linux & Windows):
  • Python 版本:3.6.4
  • pypinyin 版本:0.29.0

问题描述

pinyin_list = pinyin(u'物美价廉',style=Style.TONE2,heteronym=False)
print(pinyin_list)

[['jia4'], ['lia2n'], ['wu4'], ['me3i']]

@mozillazg
Copy link
Owner

mozillazg commented Feb 23, 2018

@zhouygg 感谢反馈!这个词语的拼音有问题,可以先暂时通过自定义词组拼音库的方式覆盖掉:

In [1]: from pypinyin import pinyin, Style, load_phrases_dict

In [2]: pinyin(u'物美价廉',style=Style.TONE2,heteronym=False)
Out[2]: [['jia4'], ['lia2n'], ['wu4'], ['me3i']]

In [3]: load_phrases_dict({u'物美价廉': [[u'wù'], [u'měi'], [u'jià'], [u'lián']]})

In [4]: pinyin(u'物美价廉',style=Style.TONE2,heteronym=False)
Out[4]: [['wu4'], ['me3i'], ['jia4'], ['lia2n']]

后面会更新一下这个词语的拼音。

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

No branches or pull requests

2 participants