‘maven 引入相关的 jar
<ExPenncy> <roupId> .BelWeb </groupId> <ratifictid> pinyin4j </artifactidid> <version> 2
创建 pinyin4julit
แพ็คเกจ co.os.core.util.util.importr; นำเข้า net.sourceforge.pinyin4j.pinyinloper; sourceforge.pinyin4j.format.hanucinyincasetype; immport net.sourceforge.pinyin4j.format.hanyutinyintonetype; isourceforge.pinyin4j.format.exception.badhanyupinynynoutputputpuformatcombination; ismport java.arrayist; util. โมฆะคงที่หลัก (สตริง [] args) {string strg = "สตริง pinyin = piny44jutil.convertertertertertospell (str); system.uut.println (str +" pin yin: " + pinyin); pinyin = pinyin4jutil.convertertofirsttttttltoll (str); พินอิน) + พินอิน) + pyin); defaultFormat = ใหม่ hanucinyinoutputformat ();取取彗字字的所ระหว่าง Pinyinname.Append (NAMECHAR [S]); ParseThechineseBject (Iscountthechinese (Pintyinname.Tostringing ()));摭 Quen 摭 Quen 摭 Quen 摭 Quen 摭 Quen Zoézeron Quc default.setcasetype (hanyutyincaseType.lorwercase); (strs! = null) {สำหรับ (int j = = 1; j <strs; j +++) {pinyname.append (strs [j]); Pinyinname.Append (NameCar [S]); Integerchinese (String thestry) {// 去除釤拼拼音后的拼音列表 list <map <string, integer> integer> = arraylist ใหม่ <สตริง, จำนวนเต็ม >> (); จำนวนเต็ม> (); สตริง [] จีน = str.split (","); maplist.add (เพียงคนเดียว);} return maplist;为空 fim (ครั้งแรก! = null) { / 取出上欻合丄و两此椡集合re存สำหรับ (String stery scíสำหรับ (String scíสำหรับscíสำหรับ (String scí fory fory sever {สำหรับ (String s1: list.get (i) .keyset ()) Temp.size ()> 0) {First.clear ()}} {สำหรับ (String s: list.get.get.get.get.get. + = (str + ",");以上这佇使用 pinyin4cy วันอาทิตย์拼音分词的方是小编分享给给给给给给给大给给给给给给大给给给给给给给大给给大享大家全部内容了希望能给大大大大大参考︌望大家多多持武 ception