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

Pinyin.java 中 部分韵母错误 #1644

Closed
1 task done
iftaken opened this issue Apr 14, 2021 · 1 comment
Closed
1 task done

Pinyin.java 中 部分韵母错误 #1644

iftaken opened this issue Apr 14, 2021 · 1 comment
Assignees
Labels

Comments

@iftaken
Copy link

iftaken commented Apr 14, 2021

Describe the bug
Hello, hanlp developers, I found some bugs in the file Pinyin.java

in commit 6b60684

lve3 's yunmu is ve , but lve4 's yunmu is ue .

Source Code:
https://github.com/hankcs/HanLP/blob/1.x/src/main/java/com/hankcs/hanlp/dictionary/py/Pinyin.java#L702
https://github.com/hankcs/HanLP/blob/1.x/src/main/java/com/hankcs/hanlp/dictionary/py/Pinyin.java#L698
https://github.com/hankcs/HanLP/blob/1.x/src/main/java/com/hankcs/hanlp/dictionary/py/Pinyin.java#L841

Code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate the problem.

from pyhanlp import *
from multiprocessing import Pool, cpu_count
Pinyin = JClass("com.hankcs.hanlp.dictionary.py.Pinyin")
# hanlp 测试
text = "驴子,略带,疟疾"       
pinyin_list = HanLP.convertToPinyinList(text)
for p in pinyin_list:
    print(p.__str__(), end=" ")
print()
for pinyin in pinyin_list:
    print("%s," % pinyin.getYunmu(), end=" ")

Describe the current behavior

lv2 zi5 none5 lve4 dai4 none5 nve4 ji2 
u, i, none, ue, ai, none, ue, i, 

Expected behavior

lv2 zi5 none5 lve4 dai4 none5 nve4 ji2 
ve, i, none, ve, ai, none, ve, i, 

System information

  • OS Platform and Distribution : Linux Ubuntu 16.04
  • Python version: 3.6.12
  • HanLP version: 1.8.1

Other info / logs

  • I've completed this form and searched the web for solutions.
@hankcs
Copy link
Owner

hankcs commented Apr 17, 2021

感谢反馈,已经修复,请参考上面的commit。
如果还有问题,欢迎重开issue。

hankcs added a commit that referenced this issue Apr 17, 2021
@hankcs hankcs closed this as completed Apr 17, 2021
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