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

出现数字混排的时候,多音字错乱 #23

Open
DOVER123 opened this issue Jul 4, 2019 · 0 comments
Open

出现数字混排的时候,多音字错乱 #23

DOVER123 opened this issue Jul 4, 2019 · 0 comments

Comments

@DOVER123
Copy link

DOVER123 commented Jul 4, 2019

我的测试用例是2019年度报表,代码用的这个
pinyinUtil.getPinyin(val, "", false, true);

我看了一下,错误的原因是把2019当作了一个词语,在替换多音字的时候,i+K定位错误了,稍微修改了一下utils里面getPinyin方法中140多行左右的代码,并且去掉了第一个if里面的空格处理。
else{ noChinese+=chinese[i];result.push(chinese[i]);}

已经写的很强大了,感谢。

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

1 participant