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

“地”的拼音有错 #249

Open
noe opened this issue Aug 22, 2021 · 3 comments
Open

“地”的拼音有错 #249

noe opened this issue Aug 22, 2021 · 3 comments

Comments

@noe
Copy link

noe commented Aug 22, 2021

运行环境

  • 操作系统(Linux/macOS/Windows):mac
  • Python 版本:3.9.2
  • pypinyin 版本:0.42.0

问题描述

好像“地”的拼音总是di的,从来不是de,比如:

你应该慢慢地走。 --> nǐ yīng gāi màn màn dì zǒu 。

0.39.1版没有这个问题。可能这个问题跟 #220 有关系。

@mozillazg
Copy link
Owner

感谢反馈,这个问题暂时没有特别好的解决办法

@mozillazg
Copy link
Owner

可以试试搭配最新版的 pypinyin-dict 模块使用来解决这个问题:

In [1]: from pypinyin import lazy_pinyin, Style

In [2]: lazy_pinyin('你应该慢慢地走。', style=Style.TONE)
Out[2]: ['nǐ', 'yīng', 'gāi', 'màn', 'màn', 'dì', 'zǒu', '。']

In [3]: from pypinyin_dict.phrase_pinyin_data import di

In [4]: di.load()

In [5]: lazy_pinyin('你应该慢慢地走。', style=Style.TONE)
Out[5]: ['nǐ', 'yīng', 'gāi', 'màn', 'màn', 'de', 'zǒu', '。']

@mozillazg
Copy link
Owner

mozillazg commented Aug 4, 2022

感谢 @R0uter 分享 相关的词语拼音 mozillazg/phrase-pinyin-data#26

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

No branches or pull requests

2 participants