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

共建为拼音服务的词典库 #1

Open
mozillazg opened this issue Sep 12, 2016 · 22 comments
Open

共建为拼音服务的词典库 #1

mozillazg opened this issue Sep 12, 2016 · 22 comments

Comments

@mozillazg
Copy link
Owner

mozillazg commented Sep 12, 2016

@hotoo

拼音库主要依赖的是拼音字典、词典(后面简称“词典”),这个词典共用性很高,但由于词典库较大,出现问题的概率的也高。

建议大家一起共建、共同维护这个词典,你们觉得怎么样?
refer: mozillazg/python-pinyin#43

字典在 https://github.com/mozillazg/pinyin-data

原始数据基于 https://github.com/hotoo/pinyin/blob/master/data/phrases-dict.js

数据格式:

{词语}: {音} {音}

一行一个词语的读音,有多个音的词语可以再重复一行:

朝阳: cháo yáng
朝阳: zhāo yáng

完善数据参考资料:

@hotoo
Copy link

hotoo commented Sep 12, 2016

赞。其实现在还有个问题是可以按照词库词语分词的算法工具。

@mozillazg
Copy link
Owner Author

@hotoo 没明白你所说的问题。能麻烦详细讲讲吗?

@hotoo
Copy link

hotoo commented Sep 13, 2016

我想要一个可以根据 成语、原子词语 分词的工具。现在很多分词工具都太智能了,能联想很长一串短语,不适合作为拼音的分词工具。

@mozillazg
Copy link
Owner Author

@hotoo 嗯,确实需要一个这样的分词库。
现在的分词工具确实是会分出来一些不是词语的短语。

@onsunsl
Copy link

onsunsl commented Mar 13, 2017

这个怎么配置pinyin库使用?
另:我这有部分多字库怎么提供这儿。

@onsunsl
Copy link

onsunsl commented Mar 13, 2017

这个词库怎么使用

@mozillazg
Copy link
Owner Author

mozillazg commented Mar 13, 2017

@onsunsl 提 PR 就可以了。我会定期基于这个仓库的数据更新 pypinyin 模块,然后直接使用更新后的 pypinyin 模块就可以了。

@onsunsl
Copy link

onsunsl commented Mar 14, 2017

我的格式和你的不一样
git不会用,你先给我email我给你发过去,你转一下再并合吧,这样快点。

@mozillazg
Copy link
Owner Author

@onsunsl 为了防垃圾邮件我就不直接贴邮箱地址了,https://github.com/mozillazg 这个页面的头像下面有我的邮箱,麻烦你看一下。

@onsunsl
Copy link

onsunsl commented Mar 15, 2017

发邮件了

@mozillazg
Copy link
Owner Author

@onsunsl 谢谢!邮件已收到,我会尽快抽空更新一下。

@onsunsl
Copy link

onsunsl commented Mar 22, 2017

楼主,我提供的词库什么时候能更新pypinyin里?

@mozillazg
Copy link
Owner Author

@onsunsl 稍等,我晚上更新一个版本。

@mozillazg
Copy link
Owner Author

@onsunsl 已更新,麻烦更新到最新版本的 pypinyin。

@onsunsl
Copy link

onsunsl commented Mar 23, 2017

好的,谢谢,你把pipy包也更新一下吧

@mozillazg
Copy link
Owner Author

@onsunsl PyPI 包当时就已经更新了:https://pypi.python.org/pypi/pypinyin

@onsunsl
Copy link

onsunsl commented Mar 27, 2017

更新之后的版本我测试了一下,还有2198个词不一样(用pypinyin与我提供的词库拼音一致)

@mozillazg
Copy link
Owner Author

@onsunsl 应该是有 2198 个词没有被 jieba 识别为词组。

@mozillazg
Copy link
Owner Author

@onsunsl 还有就是有些 儿'r'的音我转换为了: 儿'er':

哪儿: nǎr -> 哪儿: nǎ er

@menghuanpy
Copy link

不会用 PR, load_phrases_dict({'了别': [['liǎo'], ['bié']]})
了别: liǎo, bié

@mozillazg
Copy link
Owner Author

@menghuanpy 感谢分享~

@menghuanpy
Copy link

menghuanpy commented Feb 18, 2021 via email

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

No branches or pull requests

4 participants