houbb / pinyin

The high performance pinyin tool for java.(java 高性能中文转拼音工具。支持同音字。)
https://houbb.github.io/opensource/pinyin
Apache License 2.0
241 stars 34 forks source link

如何忽略非中文单词? #22

Closed jamesxujoy closed 1 year ago

jamesxujoy commented 2 years ago

貌似在Pinyin.toPinyinList中会将非中文单词直接原封不动的加上

houbb commented 1 year ago

暂时不支持过滤。

如果想过滤掉,可以再转换前,先把非中文的字符移除掉,只处理中文字符。

结合业务具体处理。