/**
* @(#)cntospell.java 【程序编程相关:SQLDMO应用——3.2 获取服务器文】 【推荐阅读:SQLDMO应用——3.1获取局域网可用】 * 版权声明 easydozer 版权所有 违者必究 【扩展信息:DNS 查询的工作原理】 * * 修订记录: * 1)更改者:easydozer * 时 间:2004-10-20 * 描 述:创建 */ 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); ... 下一页