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

我写了个更全更快的拼音工具类 #62

Open
duanluan opened this issue Oct 30, 2022 · 0 comments
Open

我写了个更全更快的拼音工具类 #62

duanluan opened this issue Oct 30, 2022 · 0 comments

Comments

@duanluan
Copy link

简介

性能测试结果(快 1 倍):ZUtil/ToPinyinTest.java at main · duanluan/ZUtil

数据来源:mozillazg/pinyin-data: 汉字拼音数据

方法特性

  • 是否带声调;
  • 是否只取多音字的第一个拼音;
  • 拼音之间的分隔符;

拼音特性

  • 第一个汉字的拼音首字母是否大写;
  • 后续汉字的拼音首字母是否大写;
  • 如果遇到非汉字,传参了分隔符时,非汉字的两侧是否需要此分隔符。

后续计划

  • 地名词典,在不获取多音时直接替换地名;
  • 自定义词典,在不获取多音时正则替换。
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