-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Closed
Labels
feature requestSuggest an idea for this projectSuggest an idea for this project
Description
Describe the feature and the current behavior/state.
莎这个多音字一般常见于人名,比如:莎士比亚
,丽莎
等,当前发现在莎草
这个词或者一些古文中读作suo
。
目前的拼音词典里将suo
排在了sha
前面,导致所有人名、地名的拼音转换全都不正确,是否将sha
作为词典的第一顺位解析比较合适呢?
Will this change the current api? How?
当前的API不需要调整,只需要调整词典即可,当然用户可以自己调整拼音词典,但是这个多音字确实是sha1
用的比较频繁,应用更广泛,因此才恳请在项目中调整。
修改词典文件data/dictionary/pinyin/pinyin.txt,将莎=suo1,sha1
调整成莎=sha1,suo1
,同时添加词典踏莎行=ta4,suo1,xing2
。
Who will benefit with this feature?
基本所有人都会受益于这次改动,毕竟莎草
也已经定义到词典中了,剩余情况基本都是解释成sha
。
Are you willing to contribute it (Yes/No):
如果有必要的话,我可以提交PR。当然作者直接调整会更快些。
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
- Python version: Java 8
- HanLP version:
<dependency>
<groupId>com.hankcs</groupId>
<artifactId>hanlp</artifactId>
<version>portable-1.8.2</version>
</dependency>
Any other info
代码段:
System.out.println(HanLP.convertToPinyinString("《罗密欧与朱丽叶》是莎士比亚创作的。", "_", false));
输出结果:
《_luo_mi_ou_yu_zhu_li_ye_》_shi_suo_shi_bi_ya_chuang_zuo_de_。
- I've carefully completed this form.
Metadata
Metadata
Assignees
Labels
feature requestSuggest an idea for this projectSuggest an idea for this project