番茄的梦想

那一抹夕阳

  博客园  :: 首页  ::  :: 联系 :: 订阅 订阅  :: 管理
GB2312标准共收录6763个汉字,其中一级汉字3755个,二级汉字3008个。
 
分区表示 
 GB 2312中对所收汉字进行了“分区”处理,每区含有94个汉字/符号。这种表示方式也称为区位码。
 101-09区为特殊符号。
 216-55区为一级汉字,按拼音排序。 
 356-87区为二级汉字,按部首/笔画排序。
 410-15区及88-94区则未有编码。
View Code

  也就是说二级汉字与拼音不存在联系。这样网上大部分汉字转拼音类只能正确获取部分汉字的拼音(一级汉字).只有小数的3000多一点汉字.  而二级汉字根本查询不到,比如“蜻蜓”,比如"闰",虽然网上补上了二级汉字中"深圳"的圳,但与二级汉字的的总数相比,显得还是远远不够的。

    因此据于上面的问题就对现有网上存在的方法进行了扩展,使其能获取GB2312-80编码规则中的所有中文汉字.

  功能描述:


  1.汉字字符串转换为全拼表示         

  2.汉字字符串转换为全拼音的首字母表示.比如:"生活的七色板"返回的是"SHDQSB"

        相比现有网上绝大部分方法做的性能改进:  

  性能及改进:
    1.使用StringBuilder连接要解析的字符串中的各个拼音.这个方法大量的字符串性能改善非常明显。      
  2.对一级字符串(日常使用最普遍的汉字)采用分块查找.加快查找速度。
  3.支持一二级所有汉字(也就是支持所有GB2312字符集中汉字)。

   缺点:不能区分多音字,只完全支持GB2312-80汉字库,如果是多音字,只能得到最后一个列表中的拼音。

   补充:如果想支持多音字,建议用词库资源库的方式进行查找编程如果有时间,我也会用这个词库资源库方式再作一个汉字转拼音的类库,以尽量支持汉字多音字及标号拼音。敬请关注

  下面是当前改进的汉字转拼音类:

  1 using System;
  2 using System.Collections.Generic;
  3 using System.Linq;
  4 using System.Text;
  5 
  6 namespace MyPinYin
  7 {
  8     /// <summary>
  9     /// 汉字拼音转换类
 10     /// </summary>
 11     public class PinYinConverter
 12     {
 13         #region 数组信息
 14 
 15         private static int[] pyValue = new int[] 
 16 
 17         {
 18             -20319, -20317, -20304, -20295, -20292, -20283, -20265, -20257, -20242
 19 
 20             -20230, -20051, -20036, -20032, -20026, -20002, -19990, -19986, -19982,
 21 
 22             -19976, -19805, -19784, -19775, -19774, -19763, -19756, -19751, -19746
 23 
 24             -19741, -19739, -19728, -19725, -19715, -19540, -19531, -19525, -19515
 25 
 26             -19500, -19484, -19479, -19467, -19289, -19288, -19281, -19275, -19270
 27 
 28             -19263, -19261, -19249, -19243, -19242, -19238, -19235, -19227, -19224
 29 
 30             -19218, -19212, -19038, -19023, -19018, -19006, -19003, -18996, -18977,
 31 
 32             -18961, -18952, -18783, -18774, -18773, -18763, -18756, -18741, -18735
 33 
 34             -18731, -18722, -18710, -18697, -18696, -18526, -18518, -18501, -18490,
 35 
 36             -18478, -18463, -18448, -18447, -18446, -18239, -18237, -18231, -18220,
 37 
 38             -18211, -18201, -18184, -18183, -18181, -18012, -17997, -17988, -17970
 39 
 40             -17964, -17961, -17950, -17947, -17931, -17928, -17922, -17759, -17752
 41 
 42             -17733, -17730, -17721, -17703, -17701, -17697, -17692, -17683, -17676,
 43 
 44             -17496, -17487, -17482, -17468, -17454, -17433, -17427, -17417, -17202
 45 
 46             -17185, -16983, -16970, -16942, -16915, -16733, -16708, -16706, -16689
 47 
 48             -16664, -16657, -16647, -16474, -16470, -16465, -16459, -16452, -16448
 49 
 50             -16433, -16429, -16427, -16423, -16419, -16412, -16407, -16403, -16401
 51 
 52             -16393, -16220, -16216, -16212, -16205, -16202, -16187, -16180, -16171,
 53 
 54             -16169, -16158, -16155, -15959, -15958, -15944, -15933, -15920, -15915
 55 
 56             -15903, -15889, -15878, -15707, -15701, -15681, -15667, -15661, -15659
 57 
 58             -15652, -15640, -15631, -15625, -15454, -15448, -15436, -15435, -15419,
 59 
 60             -15416, -15408, -15394, -15385, -15377, -15375, -15369, -15363, -15362
 61 
 62             -15183, -15180, -15165, -15158, -15153, -15150, -15149, -15144, -15143
 63 
 64             -15141, -15140, -15139, -15128, -15121, -15119, -15117, -15110, -15109
 65 
 66             -14941, -14937, -14933, -14930, -14929, -14928, -14926, -14922, -14921,
 67 
 68             -14914, -14908, -14902, -14894, -14889, -14882, -14873, -14871, -14857
 69 
 70             -14678, -14674, -14670, -14668, -14663, -14654, -14645, -14630, -14594,
 71 
 72             -14429, -14407, -14399, -14384, -14379, -14368, -14355, -14353, -14345,
 73 
 74             -14170, -14159, -14151, -14149, -14145, -14140, -14137, -14135, -14125
 75 
 76             -14123, -14122, -14112, -14109, -14099, -14097, -14094, -14092, -14090
 77 
 78             -14087, -14083, -13917, -13914, -13910, -13907, -13906, -13905, -13896
 79 
 80             -13894, -13878, -13870, -13859, -13847, -13831, -13658, -13611, -13601,
 81 
 82             -13406, -13404, -13400, -13398, -13395, -13391, -13387, -13383, -13367
 83 
 84             -13359, -13356, -13343, -13340, -13329, -13326, -13318, -13147, -13138
 85 
 86             -13120, -13107, -13096, -13095, -13091, -13076, -13068, -13063, -13060
 87 
 88             -12888, -12875, -12871, -12860, -12858, -12852, -12849, -12838, -12831,
 89 
 90             -12829, -12812, -12802, -12607, -12597, -12594, -12585, -12556, -12359,
 91 
 92             -12346, -12320, -12300, -12120, -12099, -12089, -12074, -12067, -12058,
 93 
 94             -12039, -11867, -11861, -11847, -11831, -11798, -11781, -11604, -11589
 95 
 96             -11536, -11358, -11340, -11339, -11324, -11303, -11097, -11077, -11067,
 97 
 98             -11055, -11052, -11045, -11041, -11038, -11024, -11020, -11019, -11018,
 99 
100             -11014, -10838, -10832, -10815, -10800, -10790, -10780, -10764, -10587,
101 
102             -10544, -10533, -10519, -10331, -10329, -10328, -10322, -10315, -10309
103 
104             -10307, -10296, -10281, -10274, -10270, -10262, -10260, -10256, -10254 
105 
106         };
107 
108         private static string[] pyName = new string[]
109 
110          { 
111              "A""Ai""An""Ang""Ao""Ba""Bai""Ban""Bang""Bao""Bei"
112 
113              "Ben""Beng""Bi""Bian""Biao""Bie""Bin""Bing""Bo""Bu",
114 
115              "Ba""Cai""Can""Cang""Cao""Ce""Ceng""Cha""Chai""Chan",
116 
117              "Chang""Chao""Che""Chen""Cheng""Chi""Chong""Chou""Chu",
118 
119              "Chuai""Chuan""Chuang""Chui""Chun""Chuo""Ci""Cong""Cou",
120 
121              "Cu""Cuan""Cui""Cun""Cuo""Da""Dai""Dan""Dang""Dao""De"
122 
123              "Deng""Di""Dian""Diao""Die""Ding""Diu""Dong""Dou""Du"
124 
125              "Duan""Dui""Dun""Duo""E""En""Er""Fa""Fan""Fang""Fei"
126 
127              "Fen""Feng""Fo""Fou""Fu""Ga""Gai""Gan""Gang""Gao""Ge"
128 
129              "Gei""Gen""Geng""Gong""Gou""Gu""Gua""Guai""Guan""Guang"
130 
131              "Gui""Gun""Guo""Ha""Hai""Han""Hang""Hao""He""Hei""Hen"
132 
133              "Heng""Hong""Hou""Hu""Hua""Huai""Huan""Huang""Hui""Hun",
134 
135              "Huo""Ji""Jia""Jian""Jiang""Jiao""Jie""Jin""Jing""Jiong"
136 
137              "Jiu""Ju""Juan""Jue""Jun""Ka""Kai""Kan""Kang""Kao""Ke",
138 
139              "Ken""Keng""Kong""Kou""Ku""Kua""Kuai""Kuan""Kuang""Kui"
140 
141              "Kun""Kuo""La""Lai""Lan""Lang""Lao""Le""Lei""Leng""Li",
142 
143              "Lia""Lian""Liang""Liao""Lie""Lin""Ling""Liu""Long""Lou"
144 
145              "Lu""Lv""Luan""Lue""Lun""Luo""Ma""Mai""Man""Mang""Mao",
146 
147              "Me""Mei""Men""Meng""Mi""Mian""Miao""Mie""Min""Ming""Miu",
148 
149              "Mo""Mou""Mu""Na""Nai""Nan""Nang""Nao""Ne""Nei""Nen"
150 
151              "Neng""Ni""Nian""Niang""Niao""Nie""Nin""Ning""Niu""Nong"
152 
153              "Nu""Nv""Nuan""Nue""Nuo""O""Ou""Pa""Pai""Pan""Pang",
154 
155              "Pao""Pei""Pen""Peng""Pi""Pian""Piao""Pie""Pin""Ping"
156 
157              "Po""Pu""Qi""Qia""Qian""Qiang""Qiao""Qie""Qin""Qing",
158 
159              "Qiong""Qiu""Qu""Quan""Que""Qun""Ran""Rang""Rao""Re",
160 
161              "Ren""Reng""Ri""Rong""Rou""Ru""Ruan""Rui""Run""Ruo"
162 
163              "Sa""Sai""San""Sang""Sao""Se""Sen""Seng""Sha""Shai"
164 
165              "Shan""Shang""Shao""She""Shen""Sheng""Shi""Shou""Shu"
166 
167              "Shua""Shuai""Shuan""Shuang""Shui""Shun""Shuo""Si""Song"
168 
169              "Sou""Su""Suan""Sui""Sun""Suo""Ta""Tai""Tan""Tang"
170 
171              "Tao""Te""Teng""Ti""Tian""Tiao""Tie""Ting""Tong""Tou",
172 
173              "Tu""Tuan""Tui""Tun""Tuo""Wa""Wai""Wan""Wang""Wei",
174 
175              "Wen""Weng""Wo""Wu""Xi""Xia""Xian""Xiang""Xiao""Xie",
176 
177              "Xin""Xing""Xiong""Xiu""Xu""Xuan""Xue""Xun""Ya""Yan",
178 
179              "Yang""Yao""Ye""Yi""Yin""Ying""Yo""Yong""You""Yu"
180 
181              "Yuan""Yue""Yun""Za""Zai""Zan""Zang""Zao""Ze""Zei",
182 
183              "Zen""Zeng""Zha""Zhai""Zhan""Zhang""Zhao""Zhe""Zhen"
184 
185              "Zheng""Zhi""Zhong""Zhou""Zhu""Zhua""Zhuai""Zhuan"
186 
187              "Zhuang""Zhui""Zhun""Zhuo""Zi""Zong""Zou""Zu""Zuan",
188 
189              "Zui""Zun""Zuo" 
190          };
191 
192         #region 二级汉字
193         /// <summary>
194         /// 二级汉字数组
195         /// </summary>
196         private static string[] otherChinese = new string[]
197         {
198             "","","","","廿","","","","","","","","","","丿"
199             ,"","","","","","","","","","","","","","","",""
200             ,"","","","","","","","","","","","","","","",""
201             ,"","","","","","","","","","","","","","","",""
202             ,"","","","","","","","","","","","","","","",""
203             ,"","","","","","","","","","","","","","",""
204             ,"","","","","","","","","","","","","","",""
205             ,"","","","","","","","","","","","","","","",""
206             ,"","","","","","","","","","","","","","","",""
207             ,"","","","","","","","","","","","","","","",""
208             ,"","","","","","","","","","","","","","","",""
209             ,"","","","","","","","","","","","","","",""
210             ,"","","","","","","","","","","","","","",""
211             ,"","","","","","","","","","","","","","","",""
212             ,"","","","诿","","","","","","","","","","","",""
213             ,"","","","","","","","","","","","","","","",""
214             ,"","","","","","","","","","","","","","","",""
215             ,"","","","","","","","","","","","","","",""
216             ,"","","","","","","","","","","","","","",""
217             ,"","","","","","","","","","","","","","","",""
218             ,"","","","","","","","","","","","","","","",""
219             ,"","","","","","","","","","","","","","","",""
220             ,"","","","","","","","","","","","","","","",""
221             ,"","","","","","","","","","","","","","",""
222             ,"","","","","","","","","","","","","","",""
223             ,"","","","","","","","","","","","","","","",""
224             ,"","","","","","","","","","","","","","","",""
225             ,"","","","","","","","","","","","","","","",""
226             ,"","","","","","","","","","","","","","","",""
227             ,"","","","","","","","","","","","","","",""
228             ,"","","","","","","","","","","","","","",""
229             ,"","","","","","","","","","","","","","","",""
230             ,"","","","","","","","","","","","","","","",""
231             ,"","","","","","","","","","","","","","","",""
232             ,"","","","","","","","","","","","","","","",""
233             ,"","","","","","","","","","","","","","",""
234             ,"","","","","","","","","","","","","","",""
235             ,"","","","","","","","","","","","","","","",""
236             ,"","","","","","","","","","","","","","","",""
237             ,"","","","","","","","","","","","","","","",""
238             ,"","","","","","","","","","","","","","","",""
239             ,"","","","","","","","","","","","","","",""
240             ,"","","","","","","","","","","","","","",""
241             ,"","","","","","","","","","","","","","","",""
242             ,"","","","","","","","","","","","","","","",""
243             ,"","","","","","","","","","","","","","","",""
244             ,"","","","","","","","","","","","","","","",""
245             ,"","","","","","","","","","","","","","",""
246             ,"","","","","","","","","","","","","","",""
247             ,"","","","","","","","","","","","","","","",""
248             ,"","","","","","","","","","","","","","","",""
249             ,"","","","","","","","","","","","","","","",""
250             ,"","","","","","","","","","","","","","","",""
251             ,"","","","","","","","","","","","","","",""
252             ,"","","","","","","","","","","","","","",""
253             ,"","","","","","","","","","","","","","","",""
254             ,"","","","","","","","","","","","","","","",""
255             ,"","","","","","","","","","","","","","","",""
256             ,"","","","","","","","","","","","","","","",""
257             ,"","","","","","","","","","","","","","",""
258             ,"","","","","","","","","","","","","","",""
259             ,"","","","","","","","","","","","","","","",""
260             ,"","","","","","","","","","","","","","","",""
261             ,"","","","","","","","","","","","","","","",""
262             ,"","","","","","","","","","","","","","","",""
263             ,"","","","","","","","","","","","","","",""
264             ,"","","","","","","","","","","","","","",""
265             ,"","","","","","","","","","","","","","","",""
266             ,"","","","","","","","","","","","","","","",""
267             ,"","","","","","","","","","","","","","","",""
268             ,"","","","","","","","","","","","","","","",""
269             ,"","","","","","","","","","","","","","",""
270             ,"","","","","","","","","","","","","","",""
271             ,"","","","","","","","","","","","","","","",""
272             ,"","","","涿","","","","","","","","","","","",""
273             ,"","","","","","","","","","","","","","","",""
274             ,"","","","","","","","","","","","","","","",""
275             ,"","","","","","","","","","","","","","",""
276             ,"","","","","","","","","","","","","","",""
277             ,"","","","","","","","","","","","","","","",""
278             ,"","","","","","","","","","","","","","","",""
279             ,"","","","","","","","","","","","","","","",""
280             ,"","","","","","","","","","","","","","","",""
281             ,"","","","","","","","","","","","","","",""
282             ,"","","","","","","","","","","","","","",""
283             ,"","","","","","","","","","","","","","","",""
284             ,"","","","","","","","","","","","","","","",""
285             ,"","","","","","","","","","","","","","","",""
286             ,"","","","","驿","","","","","","","","","","",""
287             ,"","","","","","","","","","","","","","",""
288             ,"","","","","","","","","","","","","","",""
289             ,"","","","","","","","","","","","","","","",""
290             ,"","","","","","","","","","","","","","","",""
291             ,"","","","","","","","","","","","","","","",""
292             ,"","","","","","","","","","","","","","","",""
293             ,"","","","","","","","","","","","","","",""
294             ,"","","","","","","","","","","","","","",""
295             ,"","","","","","","","","","","","","","","",""
296             ,"","","","","","","","","","","","","","","",""
297             ,"","","","","","","","","","","","","","","",""
298             ,"","","","","","","","","","","","","","","",""
299             ,"","","","","","","","","","","","","","",""
300             ,"","","","","","","","","","","","","","",""
301             ,"","","","","","","","","","","","","","","",""
302             ,"","","","","","","","","槿","","","","","","",""
303             ,"","","","","","","","","","","","","","","",""
304             ,"","","","","","","","","","","","","","","",""
305             ,"","","","","","","","","","","","","","",""
306             ,"","","","","","","","","","","","","","",""
307             ,"","","","","","","","","","","","","","","",""
308             ,"","","","","","","","","","","","","","","",""
309             ,"","","","","","","","","","","","","","","",""
310             ,"","","","","","","","","","","","","","","",""
311             ,"","","","","","","","","","","","","","",""
312             ,"","","","","","","","","","","","","","",""
313             ,"","","","","","","","","","","","","","","",""
314             ,"","","","","","","","","","","","","","","",""
315             ,"","","","","","","","","","","","","","","",""
316             ,"","","","","","","","","","","","","","","",""
317             ,"","","","","","","","","","","","","","",""
318             ,"","","","","","","","","","","","","","",""
319             ,"","","","","","","","","","","","","","","",""
320             ,"","","","","","","","","","","","","","","",""
321             ,"","","","","","","","","","","","","","","",""
322             ,"","","","","","","","","","","","","","","",""
323             ,"","","","","","","","","","","","","","",""
324             ,"","","","","","","","","","","","","","",""
325             ,"","","","","","","","","","","","","","","",""
326             ,"","","","","","","","","","","","","","","",""
327             ,"","","","","","","","","","","","","","","",""
328             ,"","","","","","","","","","","","","","","",""
329             ,"","","","","","","","","","","","","","",""
330             ,"","","","","","","","","","","","","","",""
331             ,"","","","","","","","","","","","","","","",""
332             ,"","","","","","","","","","","","","","","",""
333             ,"","","","","","","","","","","","","","","",""
334             ,"","","","","","","","","","","","","","","",""
335             ,"","","","","","","","","","","","","","",""
336             ,"","","","","","","","","","","","","","",""
337             ,"","","","","","","","","","","","","","","",""
338             ,"","","","","","","","","","","","","","","",""
339             ,"","","","","","","","","","","","","","","",""
340             ,"","","","","","","","","","","","","","","",""
341             ,"","","","","","","","","","","","","","",""
342             ,"","","","","","","","","","","","","","",""
343             ,"","","","","","","","","","","","","","","",""
344             ,"","","","","","","","","","","","","","","",""
345             ,"","","","","","","","","","","","","","","",""
346             ,"","","","","","","","","","","","","","","",""
347             ,"","","","","","","","","","","","","","",""
348             ,"","","","","","","","","","","","","","",""
349             ,"","","","","","","","","","","","","","","",""
350             ,"","","","","","","","","","","","","","","",""
351             ,"","","","","","","","","","","","","","","",""
352             ,"","","","","","","","","","","","","","","",""
353             ,"","","","","","","","","","","","","","",""
354             ,"","","","","","","","","","","","","","",""
355             ,"","","","","","","","","","","","","","","",""
356             ,"","","","","","","","","","","","","","","",""
357             ,"","","","","","","","","","","","","","","",""
358             ,"","","","","","","","","","","","","","","",""
359             ,"","","","","","","","","","","","","","",""
360             ,"","","","","","","","","","","","","","",""
361             ,"","","","","","","","","","","","","","","",""
362             ,"","","","","","","","","","","","","","","",""
363             ,"","","","","","","","","","","","","","","",""
364             ,"","","","","","","","","","","","","","","",""
365             ,"","","","","","","","","","","","","","",""
366             ,"","","","","","","","","","","","","","",""
367             ,"","","","","","","","","","","","","","","",""
368             ,"","","","","","","","","","","","","","","",""
369             ,"","","","","","","","","","","","","","","",""
370             ,"羿","","","","","","","","","","","","","","",""
371             ,"","","","","","","","","","","","","","",""
372             ,"","","","","","","","","","","","","","",""
373             ,"","","","","","","","","","","","","","","",""
374             ,"","趿","","","","","","","","","","","","","",""
375             ,"","","","","","","","","","","","","","","",""
376             ,"","","","","","","","","","","","","","","",""
377             ,"","","","","","","","","","","","","","",""
378             ,"","","","","","","","","","","","","","",""
379             ,"","","","","","","","","","","","","","","",""
380             ,"","","","","","","","","","","","","","","","鱿"
381             ,"","","","","","","","","","","","","","","",""
382             ,"","","","","","","","","","","","","","","",""
383             ,"","","","","","","","","","","","","","",""
384             ,"","","","","","","","","","","","","","",""
385             ,"","","","","","","","","","","","","","","",""
386             ,"","","","","","","","","","","","","","","",""
387             ,"","","","","","","","","","","","","","","",""
388             ,"","","","","","","","","","","","","","","",""
389             ,"","","","","","","","","","","","","","",""
390         };
391 
392         /// <summary>
393         /// 二级汉字对应拼音数组
394         /// </summary>
395         private static string[] otherPinYin = new string[]
396            {                         
397                "Chu","Ji","Wu","Gai","Nian","Sa","Pi","Gen","Cheng","Ge","Nao","E","Shu","Yu","Pie","Bi",
398                 "Tuo","Yao","Yao","Zhi","Di","Xin","Yin","Kui","Yu","Gao","Tao","Dian","Ji","Nai","Nie","Ji",
399                 "Qi","Mi","Bei","Se","Gu","Ze","She","Cuo","Yan","Jue","Si","Ye","Yan","Fang","Po","Gui",
400                 "Kui","Bian","Ze","Gua","You","Ce","Yi","Wen","Jing","Ku","Gui","Kai","La","Ji","Yan","Wan",
401                 "Kuai","Piao","Jue","Qiao","Huo","Yi","Tong","Wang","Dan","Ding","Zhang","Le","Sa","Yi","Mu","Ren",
402                 "Yu","Pi","Ya","Wa","Wu","Chang","Cang","Kang","Zhu","Ning","Ka","You","Yi","Gou","Tong","Tuo",
403                 "Ni","Ga","Ji","Er","You","Kua","Kan","Zhu","Yi","Tiao","Chai","Jiao","Nong","Mou","Chou","Yan",
404                 "Li","Qiu","Li","Yu","Ping","Yong","Si","Feng","Qian","Ruo","Pai","Zhuo","Shu","Luo","Wo","Bi",
405                 "Ti","Guan","Kong","Ju","Fen","Yan","Xie","Ji","Wei","Zong","Lou","Tang","Bin","Nuo","Chi","Xi",
406                 "Jing","Jian","Jiao","Jiu","Tong","Xuan","Dan","Tong","Tun","She","Qian","Zu","Yue","Cuan","Di","Xi",
407                 "Xun","Hong","Guo","Chan","Kui","Bao","Pu","Hong","Fu","Fu","Su","Si","Wen","Yan","Bo","Gun",
408                 "Mao","Xie","Luan","Pou","Bing","Ying","Luo","Lei","Liang","Hu","Lie","Xian","Song","Ping","Zhong","Ming",
409                 "Yan","Jie","Hong","Shan","Ou","Ju","Ne","Gu","He","Di","Zhao","Qu","Dai","Kuang","Lei","Gua",
410                 "Jie","Hui","Shen","Gou","Quan","Zheng","Hun","Xu","Qiao","Gao","Kuang","Ei","Zou","Zhuo","Wei","Yu",
411                 "Shen","Chan","Sui","Chen","Jian","Xue","Ye","E","Yu","Xuan","An","Di","Zi","Pian","Mo","Dang",
412                 "Su","Shi","Mi","Zhe","Jian","Zen","Qiao","Jue","Yan","Zhan","Chen","Dan","Jin","Zuo","Wu","Qian",
413                 "Jing","Ban","Yan","Zuo","Bei","Jing","Gai","Zhi","Nie","Zou","Chui","Pi","Wei","Huang","Wei","Xi",
414                 "Han","Qiong","Kuang","Mang","Wu","Fang","Bing","Pi","Bei","Ye","Di","Tai","Jia","Zhi","Zhu","Kuai",
415                 "Qie","Xun","Yun","Li","Ying","Gao","Xi","Fu","Pi","Tan","Yan","Juan","Yan","Yin","Zhang","Po",
416                 "Shan","Zou","Ling","Feng","Chu","Huan","Mai","Qu","Shao","He","Ge","Meng","Xu","Xie","Sou","Xie",
417                 "Jue","Jian","Qian","Dang","Chang","Si","Bian","Ben","Qiu","Ben","E","Fa","Shu","Ji","Yong","He",
418                 "Wei","Wu","Ge","Zhen","Kuang","Pi","Yi","Li","Qi","Ban","Gan","Long","Dian","Lu","Che","Di",
419                 "Tuo","Ni","Mu","Ao","Ya","Die","Dong","Kai","Shan","Shang","Nao","Gai","Yin","Cheng","Shi","Guo",
420                 "Xun","Lie","Yuan","Zhi","An","Yi","Pi","Nian","Peng","Tu","Sao","Dai","Ku","Die","Yin","Leng",
421                 "Hou","Ge","Yuan","Man","Yong","Liang","Chi","Xin","Pi","Yi","Cao","Jiao","Nai","Du","Qian","Ji",
422                 "Wan","Xiong","Qi","Xiang","Fu","Yuan","Yun","Fei","Ji","Li","E","Ju","Pi","Zhi","Rui","Xian",
423                 "Chang","Cong","Qin","Wu","Qian","Qi","Shan","Bian","Zhu","Kou","Yi","Mo","Gan","Pie","Long","Ba",
424                 "Mu","Ju","Ran","Qing","Chi","Fu","Ling","Niao","Yin","Mao","Ying","Qiong","Min","Tiao","Qian","Yi",
425                 "Rao","Bi","Zi","Ju","Tong","Hui","Zhu","Ting","Qiao","Fu","Ren","Xing","Quan","Hui","Xun","Ming",
426                 "Qi","Jiao","Chong","Jiang","Luo","Ying","Qian","Gen","Jin","Mai","Sun","Hong","Zhou","Kan","Bi","Shi",
427                 "Wo","You","E","Mei","You","Li","Tu","Xian","Fu","Sui","You","Di","Shen","Guan","Lang","Ying",
428                 "Chun","Jing","Qi","Xi","Song","Jin","Nai","Qi","Ba","Shu","Chang","Tie","Yu","Huan","Bi","Fu",
429                 "Tu","Dan","Cui","Yan","Zu","Dang","Jian","Wan","Ying","Gu","Han","Qia","Feng","Shen","Xiang","Wei",
430                 "Chan","Kai","Qi","Kui","Xi","E","Bao","Pa","Ting","Lou","Pai","Xuan","Jia","Zhen","Shi","Ru",
431                 "Mo","En","Bei","Weng","Hao","Ji","Li","Bang","Jian","Shuo","Lang","Ying","Yu","Su","Meng","Dou",
432                 "Xi","Lian","Cu","Lin","Qu","Kou","Xu","Liao","Hui","Xun","Jue","Rui","Zui","Ji","Meng","Fan",
433                 "Qi","Hong","Xie","Hong","Wei","Yi","Weng","Sou","Bi","Hao","Tai","Ru","Xun","Xian","Gao","Li",
434                 "Huo","Qu","Heng","Fan","Nie","Mi","Gong","Yi","Kuang","Lian","Da","Yi","Xi","Zang","Pao","You",
435                 "Liao","Ga","Gan","Ti","Men","Tuan","Chen","Fu","Pin","Niu","Jie","Jiao","Za","Yi","Lv","Jun",
436                 "Tian","Ye","Ai","Na","Ji","Guo","Bai","Ju","Pou","Lie","Qian","Guan","Die","Zha","Ya","Qin",
437                 "Yu","An","Xuan","Bing","Kui","Yuan","Shu","En","Chuai","Jian","Shuo","Zhan","Nuo","Sang","Luo","Ying",
438                 "Zhi","Han","Zhe","Xie","Lu","Zun","Cuan","Gan","Huan","Pi","Xing","Zhuo","Huo","Zuan","Nang","Yi",
439                 "Te","Dai","Shi","Bu","Chi","Ji","Kou","Dao","Le","Zha","A","Yao","Fu","Mu","Yi","Tai",
440                 "Li","E","Bi","Bei","Guo","Qin","Yin","Za","Ka","Ga","Gua","Ling","Dong","Ning","Duo","Nao",
441                 "You","Si","Kuang","Ji","Shen","Hui","Da","Lie","Yi","Xiao","Bi","Ci","Guang","Yue","Xiu","Yi",
442                 "Pai","Kuai","Duo","Ji","Mie","Mi","Zha","Nong","Gen","Mou","Mai","Chi","Lao","Geng","En","Zha",
443                 "Suo","Zao","Xi","Zuo","Ji","Feng","Ze","Nuo","Miao","Lin","Zhuan","Zhou","Tao","Hu","Cui","Sha",
444                 "Yo","Dan","Bo","Ding","Lang","Li","Shua","Chuo","Die","Da","Nan","Li","Kui","Jie","Yong","Kui",
445                 "Jiu","Sou","Yin","Chi","Jie","Lou","Ku","Wo","Hui","Qin","Ao","Su","Du","Ke","Nie","He",
446                 "Chen","Suo","Ge","A","En","Hao","Dia","Ai","Ai","Suo","Hei","Tong","Chi","Pei","Lei","Cao",
447                 "Piao","Qi","Ying","Beng","Sou","Di","Mi","Peng","Jue","Liao","Pu","Chuai","Jiao","O","Qin","Lu",
448                 "Ceng","Deng","Hao","Jin","Jue","Yi","Sai","Pi","Ru","Cha","Huo","Nang","Wei","Jian","Nan","Lun",
449                 "Hu","Ling","You","Yu","Qing","Yu","Huan","Wei","Zhi","Pei","Tang","Dao","Ze","Guo","Wei","Wo",
450                 "Man","Zhang","Fu","Fan","Ji","Qi","Qian","Qi","Qu","Ya","Xian","Ao","Cen","Lan","Ba","Hu",
451                 "Ke","Dong","Jia","Xiu","Dai","Gou","Mao","Min","Yi","Dong","Qiao","Xun","Zheng","Lao","Lai","Song",
452                 "Yan","Gu","Xiao","Guo","Kong","Jue","Rong","Yao","Wai","Zai","Wei","Yu","Cuo","Lou","Zi","Mei",
453                 "Sheng","Song","Ji","Zhang","Lin","Deng","Bin","Yi","Dian","Chi","Pang","Cu","Xun","Yang","Hou","Lai",
454                 "Xi","Chang","Huang","Yao","Zheng","Jiao","Qu","San","Fan","Qiu","An","Guang","Ma","Niu","Yun","Xia",
455                 "Pao","Fei","Rong","Kuai","Shou","Sun","Bi","Juan","Li","Yu","Xian","Yin","Suan","Yi","Guo","Luo",
456                 "Ni","She","Cu","Mi","Hu","Cha","Wei","Wei","Mei","Nao","Zhang","Jing","Jue","Liao","Xie","Xun",
457                 "Huan","Chuan","Huo","Sun","Yin","Dong","Shi","Tang","Tun","Xi","Ren","Yu","Chi","Yi","Xiang","Bo",
458                 "Yu","Hun","Zha","Sou","Mo","Xiu","Jin","San","Zhuan","Nang","Pi","Wu","Gui","Pao","Xiu","Xiang",
459                 "Tuo","An","Yu","Bi","Geng","Ao","Jin","Chan","Xie","Lin","Ying","Shu","Dao","Cun","Chan","Wu",
460                 "Zhi","Ou","Chong","Wu","Kai","Chang","Chuang","Song","Bian","Niu","Hu","Chu","Peng","Da","Yang","Zuo",
461                 "Ni","Fu","Chao","Yi","Yi","Tong","Yan","Ce","Kai","Xun","Ke","Yun","Bei","Song","Qian","Kui",
462                 "Kun","Yi","Ti","Quan","Qie","Xing","Fei","Chang","Wang","Chou","Hu","Cui","Yun","Kui","E","Leng",
463                 "Zhui","Qiao","Bi","Su","Qie","Yong","Jing","Qiao","Chong","Chu","Lin","Meng","Tian","Hui","Shuan","Yan",
464                 "Wei","Hong","Min","Kang","Ta","Lv","Kun","Jiu","Lang","Yu","Chang","Xi","Wen","Hun","E","Qu",
465                 "Que","He","Tian","Que","Kan","Jiang","Pan","Qiang","San","Qi","Si","Cha","Feng","Yuan","Mu","Mian",
466                 "Dun","Mi","Gu","Bian","Wen","Hang","Wei","Le","Gan","Shu","Long","Lu","Yang","Si","Duo","Ling",
467                 "Mao","Luo","Xuan","Pan","Duo","Hong","Min","Jing","Huan","Wei","Lie","Jia","Zhen","Yin","Hui","Zhu",
468                 "Ji","Xu","Hui","Tao","Xun","Jiang","Liu","Hu","Xun","Ru","Su","Wu","Lai","Wei","Zhuo","Juan",
469                 "Cen","Bang","Xi","Mei","Huan","Zhu","Qi","Xi","Song","Du","Zhuo","Pei","Mian","Gan","Fei","Cong",
470                 "Shen","Guan","Lu","Shuan","Xie","Yan","Mian","Qiu","Sou","Huang","Xu","Pen","Jian","Xuan","Wo","Mei",
471                 "Yan","Qin","Ke","She","Mang","Ying","Pu","Li","Ru","Ta","Hun","Bi","Xiu","Fu","Tang","Pang",
472                 "Ming","Huang","Ying","Xiao","Lan","Cao","Hu","Luo","Huan","Lian","Zhu","Yi","Lu","Xuan","Gan","Shu",
473                 "Si","Shan","Shao","Tong","Chan","Lai","Sui","Li","Dan","Chan","Lian","Ru","Pu","Bi","Hao","Zhuo",
474                 "Han","Xie","Ying","Yue","Fen","Hao","Ba","Bao","Gui","Dang","Mi","You","Chen","Ning","Jian","Qian",
475                 "Wu","Liao","Qian","Huan","Jian","Jian","Zou","Ya","Wu","Jiong","Ze","Yi","Er","Jia","Jing","Dai",
476                 "Hou","Pang","Bu","Li","Qiu","Xiao","Ti","Qun","Kui","Wei","Huan","Lu","Chuan","Huang","Qiu","Xia",
477                 "Ao","Gou","Ta","Liu","Xian","Lin","Ju","Xie","Miao","Sui","La","Ji","Hui","Tuan","Zhi","Kao",
478                 "Zhi","Ji","E","Chan","Xi","Ju","Chan","Jing","Nu","Mi","Fu","Bi","Yu","Che","Shuo","Fei",
479                 "Yan","Wu","Yu","Bi","Jin","Zi","Gui","Niu","Yu","Si","Da","Zhou","Shan","Qie","Ya","Rao",
480                 "Shu","Luan","Jiao","Pin","Cha","Li","Ping","Wa","Xian","Suo","Di","Wei","E","Jing","Biao","Jie",
481                 "Chang","Bi","Chan","Nu","Ao","Yuan","Ting","Wu","Gou","Mo","Pi","Ai","Pin","Chi","Li","Yan",
482                 "Qiang","Piao","Chang","Lei","Zhang","Xi","Shan","Bi","Niao","Mo","Shuang","Ga","Ga","Fu","Nu","Zi",
483                 "Jie","Jue","Bao","Zang","Si","Fu","Zou","Yi","Nu","Dai","Xiao","Hua","Pian","Li","Qi","Ke",
484                 "Zhui","Can","Zhi","Wu","Ao","Liu","Shan","Biao","Cong","Chan","Ji","Xiang","Jiao","Yu","Zhou","Ge",
485                 "Wan","Kuang","Yun","Pi","Shu","Gan","Xie","Fu","Zhou","Fu","Chu","Dai","Ku","Hang","Jiang","Geng",
486                 "Xiao","Ti","Ling","Qi","Fei","Shang","Gun","Duo","Shou","Liu","Quan","Wan","Zi","Ke","Xiang","Ti",
487                 "Miao","Hui","Si","Bian","Gou","Zhui","Min","Jin","Zhen","Ru","Gao","Li","Yi","Jian","Bin","Piao",
488                 "Man","Lei","Miao","Sao","Xie","Liao","Zeng","Jiang","Qian","Qiao","Huan","Zuan","Yao","Ji","Chuan","Zai",
489                 "Yong","Ding","Ji","Wei","Bin","Min","Jue","Ke","Long","Dian","Dai","Po","Min","Jia","Er","Gong",
490                 "Xu","Ya","Heng","Yao","Luo","Xi","Hui","Lian","Qi","Ying","Qi","Hu","Kun","Yan","Cong","Wan",
491                 "Chen","Ju","Mao","Yu","Yuan","Xia","Nao","Ai","Tang","Jin","Huang","Ying","Cui","Cong","Xuan","Zhang",
492                 "Pu","Can","Qu","Lu","Bi","Zan","Wen","Wei","Yun","Tao","Wu","Shao","Qi","Cha","Ma","Li",
493                 "Pi","Miao","Yao","Rui","Jian","Chu","Cheng","Cong","Xiao","Fang","Pa","Zhu","Nai","Zhi","Zhe","Long",
494                 "Jiu","Ping","Lu","Xia","Xiao","You","Zhi","Tuo","Zhi","Ling","Gou","Di","Li","Tuo","Cheng","Kao",
495                 "Lao","Ya","Rao","Zhi","Zhen","Guang","Qi","Ting","Gua","Jiu","Hua","Heng","Gui","Jie","Luan","Juan",
496                 "An","Xu","Fan","Gu","Fu","Jue","Zi","Suo","Ling","Chu","Fen","Du","Qian","Zhao","Luo","Chui",
497                 "Liang","Guo","Jian","Di","Ju","Cou","Zhen","Nan","Zha","Lian","Lan","Ji","Pin","Ju","Qiu","Duan",
498                 "Chui","Chen","Lv","Cha","Ju","Xuan","Mei","Ying","Zhen","Fei","Ta","Sun","Xie","Gao","Cui","Gao",
499                 "Shuo","Bin","Rong","Zhu","Xie","Jin","Qiang","Qi","Chu","Tang","Zhu","Hu","Gan","Yue","Qing","Tuo",
500                 "Jue","Qiao","Qin","Lu","Zun","Xi","Ju","Yuan","Lei","Yan","Lin","Bo","Cha","You","Ao","Mo",
501                 "Cu","Shang","Tian","Yun","Lian","Piao","Dan","Ji","Bin","Yi","Ren","E","Gu","Ke","Lu","Zhi",
502                 "Yi","Zhen","Hu","Li","Yao","Shi","Zhi","Quan","Lu","Zhe","Nian","Wang","Chuo","Zi","Cou","Lu",
503                 "Lin","Wei","Jian","Qiang","Jia","Ji","Ji","Kan","Deng","Gai","Jian","Zang","Ou","Ling","Bu","Beng",
504                 "Zeng","Pi","Po","Ga","La","Gan","Hao","Tan","Gao","Ze","Xin","Yun","Gui","He","Zan","Mao",
505                 "Yu","Chang","Ni","Qi","Sheng","Ye","Chao","Yan","Hui","Bu","Han","Gui","Xuan","Kui","Ai","Ming",
506                 "Tun","Xun","Yao","Xi","Nang","Ben","Shi","Kuang","Yi","Zhi","Zi","Gai","Jin","Zhen","Lai","Qiu",
507                 "Ji","Dan","Fu","Chan","Ji","Xi","Di","Yu","Gou","Jin","Qu","Jian","Jiang","Pin","Mao","Gu",
508                 "Wu","Gu","Ji","Ju","Jian","Pian","Kao","Qie","Suo","Bai","Ge","Bo","Mao","Mu","Cui","Jian",
509                 "San","Shu","Chang","Lu","Pu","Qu","Pie","Dao","Xian","Chuan","Dong","Ya","Yin","Ke","Yun","Fan",
510                 "Chi","Jiao","Du","Die","You","Yuan","Guo","Yue","Wo","Rong","Huang","Jing","Ruan","Tai","Gong","Zhun",
511                 "Na","Yao","Qian","Long","Dong","Ka","Lu","Jia","Shen","Zhou","Zuo","Gua","Zhen","Qu","Zhi","Jing",
512                 "Guang","Dong","Yan","Kuai","Sa","Hai","Pian","Zhen","Mi","Tun","Luo","Cuo","Pao","Wan","Niao","Jing",
513                 "Yan","Fei","Yu","Zong","Ding","Jian","Cou","Nan","Mian","Wa","E","Shu","Cheng","Ying","Ge","Lv",
514                 "Bin","Teng","Zhi","Chuai","Gu","Meng","Sao","Shan","Lian","Lin","Yu","Xi","Qi","Sha","Xin","Xi",
515                 "Biao","Sa","Ju","Sou","Biao","Biao","Shu","Gou","Gu","Hu","Fei","Ji","Lan","Yu","Pei","Mao",
516                 "Zhan","Jing","Ni","Liu","Yi","Yang","Wei","Dun","Qiang","Shi","Hu","Zhu","Xuan","Tai","Ye","Yang",
517                 "Wu","Han","Men","Chao","Yan","Hu","Yu","Wei","Duan","Bao","Xuan","Bian","Tui","Liu","Man","Shang",
518                 "Yun","Yi","Yu","Fan","Sui","Xian","Jue","Cuan","Huo","Tao","Xu","Xi","Li","Hu","Jiong","Hu",
519                 "Fei","Shi","Si","Xian","Zhi","Qu","Hu","Fu","Zuo","Mi","Zhi","Ci","Zhen","Tiao","Qi","Chan",
520                 "Xi","Zhuo","Xi","Rang","Te","Tan","Dui","Jia","Hui","Nv","Nin","Yang","Zi","Que","Qian","Min",
521                 "Te","Qi","Dui","Mao","Men","Gang","Yu","Yu","Ta","Xue","Miao","Ji","Gan","Dang","Hua","Che",
522                 "Dun","Ya","Zhuo","Bian","Feng","Fa","Ai","Li","Long","Zha","Tong","Di","La","Tuo","Fu","Xing",
523                 "Mang","Xia","Qiao","Zhai","Dong","Nao","Ge","Wo","Qi","Dui","Bei","Ding","Chen","Zhou","Jie","Di",
524                 "Xuan","Bian","Zhe","Gun","Sang","Qing","Qu","Dun","Deng","Jiang","Ca","Meng","Bo","Kan","Zhi","Fu",
525                 "Fu","Xu","Mian","Kou","Dun","Miao","Dan","Sheng","Yuan","Yi","Sui","Zi","Chi","Mou","Lai","Jian",
526                 "Di","Suo","Ya","Ni","Sui","Pi","Rui","Sou","Kui","Mao","Ke","Ming","Piao","Cheng","Kan","Lin",
527                 "Gu","Ding","Bi","Quan","Tian","Fan","Zhen","She","Wan","Tuan","Fu","Gang","Gu","Li","Yan","Pi",
528                 "Lan","Li","Ji","Zeng","He","Guan","Juan","Jin","Ga","Yi","Po","Zhao","Liao","Tu","Chuan","Shan",
529                 "Men","Chai","Nv","Bu","Tai","Ju","Ban","Qian","Fang","Kang","Dou","Huo","Ba","Yu","Zheng","Gu",
530                 "Ke","Po","Bu","Bo","Yue","Mu","Tan","Dian","Shuo","Shi","Xuan","Ta","Bi","Ni","Pi","Duo",
531                 "Kao","Lao","Er","You","Cheng","Jia","Nao","Ye","Cheng","Diao","Yin","Kai","Zhu","Ding","Diu","Hua",
532                 "Quan","Ha","Sha","Diao","Zheng","Se","Chong","Tang","An","Ru","Lao","Lai","Te","Keng","Zeng","Li",
533                 "Gao","E","Cuo","Lve","Liu","Kai","Jian","Lang","Qin","Ju","A","Qiang","Nuo","Ben","De","Ke",
534                 "Kun","Gu","Huo","Pei","Juan","Tan","Zi","Qie","Kai","Si","E","Cha","Sou","Huan","Ai","Lou",
535                 "Qiang","Fei","Mei","Mo","Ge","Juan","Na","Liu","Yi","Jia","Bin","Biao","Tang","Man","Luo","Yong",
536                 "Chuo","Xuan","Di","Tan","Jue","Pu","Lu","Dui","Lan","Pu","Cuan","Qiang","Deng","Huo","Zhuo","Yi",
537                 "Cha","Biao","Zhong","Shen","Cuo","Zhi","Bi","Zi","Mo","Shu","Lv","Ji","Fu","Lang","Ke","Ren",
538                 "Zhen","Ji","Se","Nian","Fu","Rang","Gui","Jiao","Hao","Xi","Po","Die","Hu","Yong","Jiu","Yuan",
539                 "Bao","Zhen","Gu","Dong","Lu","Qu","Chi","Si","Er","Zhi","Gua","Xiu","Luan","Bo","Li","Hu",
540                 "Yu","Xian","Ti","Wu","Miao","An","Bei","Chun","Hu","E","Ci","Mei","Wu","Yao","Jian","Ying",
541                 "Zhe","Liu","Liao","Jiao","Jiu","Yu","Hu","Lu","Guan","Bing","Ding","Jie","Li","Shan","Li","You",
542                 "Gan","Ke","Da","Zha","Pao","Zhu","Xuan","Jia","Ya","Yi","Zhi","Lao","Wu","Cuo","Xian","Sha",
543                 "Zhu","Fei","Gu","Wei","Yu","Yu","Dan","La","Yi","Hou","Chai","Lou","Jia","Sao","Chi","Mo",
544                 "Ban","Ji","Huang","Biao","Luo","Ying","Zhai","Long","Yin","Chou","Ban","Lai","Yi","Dian","Pi","Dian",
545                 "Qu","Yi","Song","Xi","Qiong","Zhun","Bian","Yao","Tiao","Dou","Ke","Yu","Xun","Ju","Yu","Yi",
546                 "Cha","Na","Ren","Jin","Mei","Pan","Dang","Jia","Ge","Ken","Lian","Cheng","Lian","Jian","Biao","Chu",
547                 "Ti","Bi","Ju","Duo","Da","Bei","Bao","Lv","Bian","Lan","Chi","Zhe","Qiang","Ru","Pan","Ya",
548                 "Xu","Jun","Cun","Jin","Lei","Zi","Chao","Si","Huo","Lao","Tang","Ou","Lou","Jiang","Nou","Mo",
549                 "Die","Ding","Dan","Ling","Ning","Guo","Kui","Ao","Qin","Han","Qi","Hang","Jie","He","Ying","Ke",
550                 "Han","E","Zhuan","Nie","Man","Sang","Hao","Ru","Pin","Hu","Qian","Qiu","Ji","Chai","Hui","Ge",
551                 "Meng","Fu","Pi","Rui","Xian","Hao","Jie","Gong","Dou","Yin","Chi","Han","Gu","Ke","Li","You",
552                 "Ran","Zha","Qiu","Ling","Cheng","You","Qiong","Jia","Nao","Zhi","Si","Qu","Ting","Kuo","Qi","Jiao",
553                 "Yang","Mou","Shen","Zhe","Shao","Wu","Li","Chu","Fu","Qiang","Qing","Qi","Xi","Yu","Fei","Guo",
554                 "Guo","Yi","Pi","Tiao","Quan","Wan","Lang","Meng","Chun","Rong","Nan","Fu","Kui","Ke","Fu","Sou",
555                 "Yu","You","Lou","You","Bian","Mou","Qin","Ao","Man","Mang","Ma","Yuan","Xi","Chi","Tang","Pang",
556                 "Shi","Huang","Cao","Piao","Tang","Xi","Xiang","Zhong","Zhang","Shuai","Mao","Peng","Hui","Pan","Shan","Huo",
557                 "Meng","Chan","Lian","Mie","Li","Du","Qu","Fou","Ying","Qing","Xia","Shi","Zhu","Yu","Ji","Du",
558                 "Ji","Jian","Zhao","Zi","Hu","Qiong","Po","Da","Sheng","Ze","Gou","Li","Si","Tiao","Jia","Bian",
559                 "Chi","Kou","Bi","Xian","Yan","Quan","Zheng","Jun","Shi","Gang","Pa","Shao","Xiao","Qing","Ze","Qie",
560                 "Zhu","Ruo","Qian","Tuo","Bi","Dan","Kong","Wan","Xiao","Zhen","Kui","Huang","Hou","Gou","Fei","Li",
561                 "Bi","Chi","Su","Mie","Dou","Lu","Duan","Gui","Dian","Zan","Deng","Bo","Lai","Zhou","Yu","Yu",
562                 "Chong","Xi","Nie","Nv","Chuan","Shan","Yi","Bi","Zhong","Ban","Fang","Ge","Lu","Zhu","Ze","Xi",
563                 "Shao","Wei","Meng","Shou","Cao","Chong","Meng","Qin","Niao","Jia","Qiu","Sha","Bi","Di","Qiang","Suo",
564                 "Jie","Tang","Xi","Xian","Mi","Ba","Li","Tiao","Xi","Zi","Can","Lin","Zong","San","Hou","Zan",
565                 "Ci","Xu","Rou","Qiu","Jiang","Gen","Ji","Yi","Ling","Xi","Zhu","Fei","Jian","Pian","He","Yi",
566                 "Jiao","Zhi","Qi","Qi","Yao","Dao","Fu","Qu","Jiu","Ju","Lie","Zi","Zan","Nan","Zhe","Jiang",
567                 "Chi","Ding","Gan","Zhou","Yi","Gu","Zuo","Tuo","Xian","Ming","Zhi","Yan","Shai","Cheng","Tu","Lei",
568                 "Kun","Pei","Hu","Ti","Xu","Hai","Tang","Lao","Bu","Jiao","Xi","Ju","Li","Xun","Shi","Cuo",
569                 "Dun","Qiong","Xue","Cu","Bie","Bo","Ta","Jian","Fu","Qiang","Zhi","Fu","Shan","Li","Tuo","Jia",
570                 "Bo","Tai","Kui","Qiao","Bi","Xian","Xian","Ji","Jiao","Liang","Ji","Chuo","Huai","Chi","Zhi","Dian",
571                 "Bo","Zhi","Jian","Die","Chuai","Zhong","Ju","Duo","Cuo","Pian","Rou","Nie","Pan","Qi","Chu","Jue",
572                 "Pu","Fan","Cu","Zhu","Lin","Chan","Lie","Zuan","Xie","Zhi","Diao","Mo","Xiu","Mo","Pi","Hu",
573                 "Jue","Shang","Gu","Zi","Gong","Su","Zhi","Zi","Qing","Liang","Yu","Li","Wen","Ting","Ji","Pei",
574                 "Fei","Sha","Yin","Ai","Xian","Mai","Chen","Ju","Bao","Tiao","Zi","Yin","Yu","Chuo","Wo","Mian",
575                 "Yuan","Tuo","Zhui","Sun","Jun","Ju","Luo","Qu","Chou","Qiong","Luan","Wu","Zan","Mou","Ao","Liu",
576                 "Bei","Xin","You","Fang","Ba","Ping","Nian","Lu","Su","Fu","Hou","Tai","Gui","Jie","Wei","Er",
577                 "Ji","Jiao","Xiang","Xun","Geng","Li","Lian","Jian","Shi","Tiao","Gun","Sha","Huan","Ji","Qing","Ling",
578                 "Zou","Fei","Kun","Chang","Gu","Ni","Nian","Diao","Shi","Zi","Fen","Die","E","Qiu","Fu","Huang",
579                 "Bian","Sao","Ao","Qi","Ta","Guan","Yao","Le","Biao","Xue","Man","Min","Yong","Gui","Shan","Zun",
580                 "Li","Da","Yang","Da","Qiao","Man","Jian","Ju","Rou","Gou","Bei","Jie","Tou","Ku","Gu","Di",
581                 "Hou","Ge","Ke","Bi","Lou","Qia","Kuan","Bin","Du","Mei","Ba","Yan","Liang","Xiao","Wang","Chi",
582                 "Xiang","Yan","Tie","Tao","Yong","Biao","Kun","Mao","Ran","Tiao","Ji","Zi","Xiu","Quan","Jiu","Bin",
583                 "Huan","Lie","Me","Hui","Mi","Ji","Jun","Zhu","Mi","Qi","Ao","She","Lin","Dai","Chu","You",
584                 "Xia","Yi","Qu","Du","Li","Qing","Can","An","Fen","You","Wu","Yan","Xi","Qiu","Han","Zha"
585            };
586         #endregion 二级汉字
587         #region 变量定义
588         // GB2312-80 标准规范中第一个汉字的机内码.即"啊"的机内码
589         private const int firstChCode = -20319;
590         // GB2312-80 标准规范中最后一个汉字的机内码.即"齄"的机内码
591         private const int lastChCode = -2050;
592         // GB2312-80 标准规范中最后一个一级汉字的机内码.即"座"的机内码
593         private const int lastOfOneLevelChCode = -10247;
594         // 配置中文字符
595         //static Regex regex = new Regex("[\u4e00-\u9fa5]$");
596 
597         #endregion
598         #endregion
599 
600         /// <summary>
601         /// 取拼音第一个字段
602         /// </summary>        
603         /// <param name="ch"></param>        
604         /// <returns></returns>        
605          public static String GetFirst(Char ch)   
606          {
607              var rs = Get(ch);  
608              if (!String.IsNullOrEmpty(rs)) rs = rs.Substring(01); 
609                              
610              return rs;   
611          }
612 
613         /// <summary>
614         /// 取拼音第一个字段
615         /// </summary>
616         /// <param name="str"></param>
617         /// <returns></returns>
618          public static String GetFirst(String str)
619          {
620              if (String.IsNullOrEmpty(str)) return String.Empty; 
621 
622              var sb = new StringBuilder(str.Length + 1); 
623              var chs = str.ToCharArray(); 
624 
625              for (var i = 0; i < chs.Length; i++) 
626              { 
627                  sb.Append(GetFirst(chs[i]));
628              } 
629              
630              return sb.ToString();
631          }
632         
633         /// <summary>
634          /// 获取单字拼音
635         /// </summary>
636         /// <param name="ch"></param>
637         /// <returns></returns>
638          public static String Get(Char ch)
639          {
640              // 拉丁字符            
641              if (ch <= '\x00FF'return ch.ToString();
642 
643              // 标点符号、分隔符            
644              if (Char.IsPunctuation(ch) || Char.IsSeparator(ch)) return ch.ToString();
645 
646              // 非中文字符            
647              if (ch < '\x4E00' || ch > '\x9FA5'return ch.ToString();
648 
649              var arr = Encoding.GetEncoding("gb2312").GetBytes(ch.ToString());
650              //Encoding.Default默认在中文环境里虽是GB2312,但在多变的环境可能是其它
651              //var arr = Encoding.Default.GetBytes(ch.ToString()); 
652              var chr = (Int16)arr[0] * 256 + (Int16)arr[1] - 65536;
653 
654              //***// 单字符--英文或半角字符  
655              if (chr > 0 && chr < 160return ch.ToString();
656              #region 中文字符处理
657 
658              // 判断是否超过GB2312-80标准中的汉字范围
659              if (chr > lastChCode || chr < firstChCode)
660              {
661                  return ch.ToString();;
662              }
663              // 如果是在一级汉字中
664              else if (chr <= lastOfOneLevelChCode)
665              {
666                  // 将一级汉字分为12块,每块33个汉字.
667                  for (int aPos = 11; aPos >= 0; aPos--)
668                  {
669                      int aboutPos = aPos * 33;
670                      // 从最后的块开始扫描,如果机内码大于块的第一个机内码,说明在此块中
671                      if (chr >= pyValue[aboutPos])
672                      {
673                          // Console.WriteLine("存在于第 " + aPos.ToString() + " 块,此块的第一个机内码是: " + pyValue[aPos * 33].ToString());
674                          // 遍历块中的每个音节机内码,从最后的音节机内码开始扫描,
675                          // 如果音节内码小于机内码,则取此音节
676                          for (int i = aboutPos + 32; i >= aboutPos; i--)
677                          {
678                              if (pyValue[i] <= chr)
679                              {
680                                  // Console.WriteLine("找到第一个小于要查找机内码的机内码: " + pyValue[i].ToString());
681                                  return pyName[i];
682                              }
683                          }
684                          break;
685                      }
686                  }
687              }
688              // 如果是在二级汉字中
689              else
690              {
691                  int pos = Array.IndexOf(otherChinese, ch.ToString());
692                  if (pos != decimal.MinusOne)
693                  {
694                      return otherPinYin[pos];
695                  }
696              }
697              #endregion 中文字符处理
698 
699              //if (chr < -20319 || chr > -10247) { // 不知道的字符  
700              //    return null;  
701          
702              //for (var i = pyValue.Length - 1; i >= 0; i--)
703              //{                
704              //    if (pyValue[i] <= chr) return pyName[i];//这只能对应数组已经定义的           
705              //}             
706              
707              return String.Empty;
708          }
709 
710         /// <summary>
711          /// 把汉字转换成拼音(全拼)
712         /// </summary>
713          /// <param name="str">汉字字符串</param>
714          /// <returns>转换后的拼音(全拼)字符串</returns>
715          public static String Get(String str)
716          {
717              if (String.IsNullOrEmpty(str)) return String.Empty; 
718              
719              var sb = new StringBuilder(str.Length * 10); 
720              var chs = str.ToCharArray(); 
721              
722              for (var j = 0; j < chs.Length; j++) 
723              { 
724                  sb.Append(Get(chs[j])); 
725              } 
726              
727              return sb.ToString();
728          }
729     }
730 }
View Code
posted on 2015-01-05 13:49  番茄的梦想  阅读(23054)  评论(9编辑  收藏  举报