Pinyin4j bug

来源:互联网 发布:java T... 编辑:程序博客网 时间:2024/06/06 03:55
在转换“嗯”的拼音的时候,

net.sourceforge.pinyin4j
工具包中的
PinyinHelper.toHanyuPinyinStringArray

方法(获取拼音),会输出ng。


但是业务方理解,“嗯”应该输出en。换用

com.github.stuxuhai.jpinyin
中的

PinyinHelper.getShortPinyin
方法(获取拼音首字母),会输出e。