′ MAVEN 引入相关的 JAR
<depenncy> <GroupId> .BelWeb </groupid> <Artifictid> pinyin4j </artifactidid> <version> 2
创建 pinyin4julit
Paket co.os.core.util.util.importr; impor net.sourceForge.pinyin4j.pinyinloper; sourceForge.pinyin4j.format.hanucinyincasetype; immport net.sourceForge.pinyin4j.format.hanyutinyintonetype; isourceForge.pinyin4j.format.exception.badhanyupinynoutputputpuformatcrination; ismport Java.arrayist; UTRoD. Void main (string [] args) {string strg = "string pinyin = piny44jutil.convertertertospell (str); System.uut.println (str +" pin yin : "pinyin (pinyin = pinyin4jutil.converTofirstofirstfirst." pinyin (str.Unyin (pinyin4jutil.converTofirstofirstirst (pinyin); pinyin = pinyin4jUtil.converTofirstofirsteRStttToll (pinyin (pinyin4jutil.converTofirsteRSttttToll (pinyin (pinyin4Jutil.converTofirstirst.inin (pinyin (pinyin (pinyin. "pinyn (pinyin." pinyin (pinyin. "pinyin); pinyin); + pinyin) + pyin); DefaultFormat = HanucinyinOutputFormat () baru; Antara. pinyinname.Perimun (namechar [s]); Parsethechinesebject (iscountthechinese (Pintyinname.tostringing ())); Quen 摭 Quen 摭 Quen 摭 Quen 摭 Quen Zoézeron Quc. DefaultFormat.setCasetype (hanyutyyincasetype.lorwercase); (Strs! = Null) {for for (int j = = 1; j <strs; j +++) {pinyname.append (strs [j]); pinyinname.append (namechar [s]);} pinkinname.append (")"); Integerchinese (string thestry) {// 去除釤拼拼音后的拼音列表 Daftar <peta <string, integer> integer> = new arraylist <string, integer >> (); Integer> (); Maplist.Add (OnlyOne);为空 fim (pertama! = Null) { / 取出上欻合丄 و 两此椡集合 ́Re 存 untuk (string stery scí for (string scí for scí for (string scí forío for Sever. {For (string s1: list.get (i) .keyset ()) {string str = s + s + s1; Temp.put, 1); Temp.Size ()> 0) {first.clear (); + = Str + ",");以上这佇使用 pinyin4cy Sunday 拼音分词的方是小编分 享给给给给给给给大给给给给给给大给给给给给给给大给给大享大家全部内容了希望能给大大大大大参考︌望大家多多持武 ception.