| |
package com.easydozer.commons.util;
import java.util.iterator; import java.util.linkedhashmap; import java.util.set;
/** * <pre>汉字转化为全拼</pre> * <br><dl><dt><b>jdk版本:</b></dt><br><dd>1.4</dd></dl> * @author 谢计生 * @version 1.0 * @see * @since 1.0 */ public class cntospell { private static linkedhashmap spellmap = null;
static { if(spellmap == null){ spellmap = new linkedhashmap(400); } initialize(); system.out.println("chinese transfer spell done."); }
private cntospell() { }
private static void spellput(string spell,int ascii) { spellmap.put(spell,new integer(ascii)); }
private static void initialize() { spellput("a", -20319); spellput("ai", -20317); spellput("an", -20304); spellput("ang", -20295); spellput("ao", -20292); spellput("ba", -20283); spellput("bai", -20265); spellput("ban", -20257); spellput("bang", -20242); spellput("bao", -20230); spellput("bei", -20051); spellput("ben", -20036); spellput("beng", -20032); spellput("bi", -20026); spellput("bian", -20002); spellput("biao", -19990); spellput("bie", -19986); spellput("bin", -19982); spellput("bing", -19976); spellput("bo", -19805); spellput("bu", -19784); spellput("ca", -19775); spellput("cai", -19774); spellput("can", -19763); spellput("cang", -19756); spellput("cao", -19751); spellput("ce", -19746); spellput("ceng", -19741); spellput("cha", -19739); spellput("chai", -19728); spellput("chan", -19725); spellput("chang", -19715); spellput("chao", -19540); spellput("che", -19531); spellput("chen", -19525); spellput("cheng", -19515); spellput("chi", -19500); spellput("chong", -19484); spellput("chou", -19479); spellput("chu", -19467); spellput("chuai", -19289); spellput("chuan", -19288); spellput("chuang", -19281); spellput("chui", -19275); spellput("chun", -19270); spellput("chuo", -19263); spellput("ci", -19261); spellput("cong", -19249); spellput("cou", -19243); spellput("cu", -19242); spellput("cuan", -19238); spellput("cui", -19235); spellput("cun", -19227); spellput("cuo", -19224); spellput("da", -19218); spellput("dai", -19212); spellput("dan", -19038); spellput("dang", -19023); spellput("dao", -19018); spellput("de", -19006); spellput("deng", -19003); spellput("di", -18996); spellput("dian", -18977); spellput("diao", -18961); spellput("die", -18952); spellput("ding", -18783); spellput("diu", -18774); spellput("dong", -18773); spellput("dou", -18763); spellput("du", -18756); spellput("duan", -18741); spellput("dui", -18735); spellput("dun", -18731); spellput("duo", -18722); spellput("e", -18710); spellput("en", -18697); spellput("er", -18696); spellput("fa", -18526); spellput("fan", -18518); spellput("fang", -18501); spellput("fei", -18490); spellput("fen", -18478); spellput("feng", -18463); spellput("fo", -18448); spellput("fou", -18447); spellput("fu", -18446); spellput("ga", -18239); spellput("gai", -18237); spellput("gan", -18231); spellput("gang", -18220); spellput("gao", -18211); spellput("ge", -18201); spellput("gei", -18184); spellput("gen", -18183); spellput("geng", -18181); spellput("gong", -18012); spellput("gou", -17997); spellput("gu", -17988); spellput("gua", -17970); spellput("guai", -17964); spellput("guan", -17961); spellput("guang", -17950); spellput("gui", -17947); spellput("gun", -17931); spellput("guo", -17928); spellput("ha", -17922); spellput("hai", -17759); spellput("han", -17752); spellput("hang", -17733); spellput("hao", -17730); spellput("he", -17721); spellput("hei", -17703); spellput("hen", -17701); spellput("heng", -17697); spellput("hong", -17692); spellput("hou", -17683); spellput("hu", -17676); spellput("hua", -17496); spellput("huai", -17487); spellput("huan", -17482); spellput("huang", -17468); spellput("hui", -17454); spellput("hun", -17433); spellput("huo", -17427); spellput("ji", -17417); spellput("jia", -17202); spellput("jian", -17185); spellput("jiang", -16983); spellput("jiao", -16970); spellput("jie", -16942); spellput("jin", -16915); spellput("jing", -16733); spellput("jiong", -16708); spellput("jiu", -16706); spellput("ju", -16689); spellput("juan", -16664); spellput("jue", -16657); spellput("jun", -16647); spellput("ka", -16474); spellput("kai", -16470); spellput("kan", -16465); spellput("kang", -16459); spellput("kao", -16452); spellput("ke", -16448); spellput("ken", -16433); spellput("keng", -16429); spellput("kong", -16427); spellput("kou", -16423); spellput("ku", -16419); spellput("kua", -16412); spellput("kuai", -16407); spellput("kuan", -16403); spellput("kuang", -16401); spellput("kui", -16393); spellput("kun", -16220); spellput("kuo", -16216); spellpu
|
|