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

多音字注音错误 #117

Closed
superhg2012 opened this Issue Jan 26, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@superhg2012

superhg2012 commented Jan 26, 2018

运行环境

  • 操作系统(Linux/macOS/Windows):
  • Python 版本:2.7.14
  • pypinyin 版本:0.27.0

问题描述

利用pypinyin的pinyin方法得到”步履蹒跚“的拼音 style为TONE3

[[u'bu4'], [u'lv3'], [u'man2'], [u'shan1']]

通过开启多音字,发现“蹒”为多音字,但是没有办法根据上下文确定读音应该是"pan2"

问题复现步骤

text = "步履蹒跚"

syllables = pinyin(text.decode('utf-8'), style=pypinyin.TONE3)

print syllables

@mozillazg

This comment has been minimized.

Owner

mozillazg commented Jan 29, 2018

目前是通过词组拼音库的方式来解决多音字的问题的,可以自定义词组拼音来解决,详见 https://pypinyin.readthedocs.io/zh_CN/master/usage.html#id5 #103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment