T9智能输入法实现原理和步骤

时间:2024-03-05 20:07:13

T9输入法全名为智能输入法,字库容量九千多字,支持十多种语言,是由美国特捷通讯软件公司开发的,该输入法解决了小型掌上设备的文字输入问题,已经成为全球手机文字输入的标准之一。

       一般手机拼音输入键盘如图:

                        

      在这个键盘上,我们对比下传统的输入法和T9 输入法,输入“中国”两个字需要的按键次数。传统的方法,先按4次9,输入字母z,再按2 次4 ,输入字母h ,再按3 次6,输入字母o,再按2 次6,输入字母n ,最后按1次4,输入字母g 。这样,输入“中”字,要按键12次,接着同样的方法,输入“国”字,需要按6次,总共就是18 次按键。  如果是 T9,我们输入“中”字,只需要输入:9、4、6、6、4,即可实现输入“中”字,在选择中字之后,T9会联想出一系列同中字组合的次,如文、国、断、山等。这样输入“国”字,我们直接选择即可,所以输入“国”字按键0次,这样T9 总共只需要5 次按键。 这就是T9 智能输入法的优越之处。正因为T9 输入法高效便捷的输入方式得到了众多手机厂商的采用,以至于T9成为了使用频率最高知名度最大的手机输入法。

     先将汉语拼音所有可能的组合全部列出来,如下所示:        

    const u8 PY_mb_space[]={""};

    const u8 PY_mb_a   []={"啊阿腌吖锕厑嗄錒呵腌"};

    const u8 PY_mb_ai  []={"爱埃挨哎唉哀皑癌蔼矮艾碍隘捱嗳嗌嫒瑷暧砹锿霭"};

    const u8 PY_mb_an  []={"安俺按暗岸案鞍氨谙胺埯揞犴庵桉铵鹌黯"};

            更多组合见代码:

View Code
//"拼音输入法汉字排列表" 
const unsigned char PY_mb_space [] = {""}; //来 自 :ST_M8._C N
const unsigned char PY_mb_a[]= {"啊阿吖嗄腌锕呵安按爱暗埃"}; 
const unsigned char PY_mb_ai[]= {"爱埃碍矮挨唉哎哀皑癌蔼艾隘呆捱嗳嗌嫒瑷暧砹锿霭"}; 
const unsigned char PY_mb_an[]= {"安按暗岸案俺氨胺鞍谙埯揞犴庵桉铵鹌黯广厂"}; 
const unsigned char PY_mb_ang[]= {"昂肮盎"}; 
const unsigned char PY_mb_ao[]= {"凹奥敖熬翱袄傲懊澳嚣坳拗嗷岙廒遨媪骜獒聱螯鏊鳌鏖"}; 
const unsigned char PY_mb_b[]= {"不部本鲍柏毕变比并别百报步办表"}; 
const unsigned char PY_mb_ba[]= {"把八吧巴拔霸罢爸坝芭捌扒叭笆疤跋靶耙茇菝岜灞钯粑鲅魃"}; 
const unsigned char PY_mb_bai[]= {"百白败摆伯柏佰拜稗捭掰"}; 
const unsigned char PY_mb_ban[]= {"办半板班般版拌搬斑扳伴颁扮瓣绊阪坂钣瘢癍舨"}; 
const unsigned char PY_mb_bang[]= {"帮棒邦榜梆膀绑磅蚌镑傍谤蒡浜"}; 
const unsigned char PY_mb_bao[]= {"报保包剥薄胞暴宝饱抱爆炮堡刨苞褒雹豹鲍曝瀑葆孢煲鸨褓趵龅勹宀"}; 
const unsigned char PY_mb_bei[]= {"北被倍备背辈贝杯卑臂悲碑钡狈惫焙孛陂邶埤萆蓓呗悖碚鹎褙鐾鞴"}; 
const unsigned char PY_mb_ben[]= {"本奔苯笨夯畚坌贲锛"}; 
const unsigned char PY_mb_beng[]= {"泵崩蚌绷甭蹦迸嘣甏"}; 
const unsigned char PY_mb_bi []= {"比必避闭辟笔壁臂毕彼逼币鼻蔽秘鄙碧蓖毙毖庇痹敝弊陛拂泌匕俾埤芘荜荸萆薜吡哔狴庳愎滗濞弼妣婢嬖璧贲睥畀铋秕裨筚箅篦舭襞跸髀"}; 
const unsigned char PY_mb_bian[]= {"变边便编遍辩扁辨鞭贬卞辫匾弁苄忭汴缏飚煸砭碥窆褊蝙笾鳊彼岸"}; //来 自 :ST_M8._C N
const unsigned char PY_mb_biao[]= {"表标彪膘勺婊骠杓飑飙镖镳瘭裱鳔髟"}; 
const unsigned char PY_mb_bie[]= {"别鳖憋瘪蹩"}; 
const unsigned char PY_mb_bin[]= {"宾彬斌濒滨摈傧豳缤玢槟殡膑镔髌鬓"}; 
const unsigned char PY_mb_bing[]= {"并病兵柄冰丙饼秉炳屏禀邴摒槟"}; 
const unsigned char PY_mb_bo[]= {"波播剥伯拨薄博勃驳玻泊柏卜菠钵搏铂箔帛舶脖膊渤魄孛亳啵饽檗掰擘礴钹鹁簸趵跛踣"}; 
const unsigned char PY_mb_bu[]= {"不部步布补捕埔卜堡哺埠簿怖卟逋瓿晡钚钸醭"}; 
const unsigned char PY_mb_c[]=   {"产成程陈蔡曹崔楚褚池仇晁岑从此处车场传厂才次查"}; 
const unsigned char PY_mb_ca[]=   {"擦拆嚓礤"}; 
const unsigned char PY_mb_cai[]=   {"采才材菜财裁彩猜睬踩蔡"}; 
const unsigned char PY_mb_can[]=  {"参残蚕灿餐惭惨孱骖璨粲黪"}; 
const unsigned char PY_mb_cang[]=  {"藏仓苍舱沧"}; 
const unsigned char PY_mb_cao[]=   {"草槽操糙曹嘈漕螬艚"}; 
const unsigned char PY_mb_ce[]=   {"测策侧册厕恻"}; 
const unsigned char PY_mb_cen[]=  {"参岑涔"}; 
const unsigned char PY_mb_ceng[]= {"层曾蹭噌"}; 
const unsigned char PY_mb_ch[]=  {"差长常昌超陈程城持重出初"}; 
const unsigned char PY_mb_cha[]=  {"查差插察茶叉茬碴搽岔诧刹喳嚓猹馇汊姹杈楂槎檫锸镲衩"}; 
const unsigned char PY_mb_chai[]=  {"差柴拆豺侪钗瘥虿"}; 
const unsigned char PY_mb_chan[]= {"产单铲阐搀掺蝉馋谗缠颤冁谄蒇廛忏潺澶孱羼婵骣觇禅镡蟾躔"}; 
const unsigned char PY_mb_chang[]= {"长常场厂唱肠昌倡偿畅猖尝敞裳倘伥鬯苌菖徜怅惝阊娼嫦昶氅鲳"}; 
const unsigned char PY_mb_chao[]=  {"朝超潮巢抄钞嘲吵炒绰剿怊晁焯耖"}; 
const unsigned char PY_mb_che[]=   {"车彻尺撤扯掣澈坼砗"}; 
const unsigned char PY_mb_chen[]=  {"陈沉称衬尘臣晨沈郴辰忱趁伧谌谶抻嗔宸琛榇碜龀"}; 
const unsigned char PY_mb_cheng[]= {"成程称城承乘呈盛撑诚橙惩澄逞骋秤丞埕噌枨柽塍瞠铖铛裎蛏酲"}; 
const unsigned char PY_mb_chi[]= {"持尺齿吃赤池迟翅斥耻痴匙弛驰侈炽傺坻墀茌叱哧啻嗤彳饬媸敕眵鸱瘛褫蚩螭笞篪豉踟魑"}; 
const unsigned char PY_mb_chong[]= {"种虫重充冲崇涌宠茺忡憧铳舂艟"}; 
const unsigned char PY_mb_chou[]=  {"抽仇臭酬畴踌稠愁筹绸瞅丑俦帱惆瘳雠"}; 
const unsigned char PY_mb_chu[]=  {"出处除初础触楚锄储畜橱厨躇雏滁矗搐亍刍怵憷绌杵楮樗褚蜍蹰黜屮"}; 
const unsigned char PY_mb_chuai[]= {"揣搋啜嘬膪踹"}; 
const unsigned char PY_mb_chuan[]= {"传船穿串川椽喘舛遄巛氚钏舡"}; 
const unsigned char PY_mb_chuang[]={"床创窗闯疮幢怆"}; 
const unsigned char PY_mb_chui[]= {"吹垂锤椎炊捶陲棰槌"}; 
const unsigned char PY_mb_chun[]=  {"春纯醇椿唇淳蠢莼鹑蝽"}; 
const unsigned char PY_mb_chuo[]= {"戳绰啜辍踔龊"}; 
const unsigned char PY_mb_ci[]=  {"此次刺磁雌词茨疵辞慈瓷赐伺兹茈呲祠鹚糍"}; 
const unsigned char PY_mb_cong[]=  {"从丛聪葱囱匆苁淙骢琮璁"}; 
const unsigned char PY_mb_cou[]=  {"凑楱辏腠"}; 
const unsigned char PY_mb_cu[]=   {"粗促醋簇卒蔟徂猝殂酢蹙蹴"}; 
const unsigned char PY_mb_cuan[]=  {"篡蹿窜攒汆撺爨镩"}; 
const unsigned char PY_mb_cui[]=  {"催脆淬粹摧衰崔瘁翠萃啐悴璀榱毳隹"}; //来 自 :ST_M8._C N
const unsigned char PY_mb_cun[]=  {"存村寸蹲忖皴"}; 
const unsigned char PY_mb_cuo[]=  {"错措撮磋搓挫厝嵯脞锉矬痤瘥鹾蹉"}; 
const unsigned char PY_mb_d[]=    {"的大地杜董段戴邓丁窦狄翟刁电党定等当队点代道"}; 
const unsigned char PY_mb_da[]=    {"大打达答搭塔瘩耷哒嗒怛妲沓疸褡笪靼鞑"}; 
const unsigned char PY_mb_dai[]=  {"大代带待袋戴呆歹傣殆贷逮怠埭甙呔岱迨骀绐玳黛"}; 
const unsigned char PY_mb_dan[]=  {"单但弹担石蛋淡胆氮丹旦耽郸掸惮诞儋萏啖澹殚赕眈疸瘅聃箪"}; 
const unsigned char PY_mb_dang[]=  {"党当档挡荡谠凼菪宕砀裆"}; 
const unsigned char PY_mb_dao[]=   {"到道导刀倒稻岛捣盗蹈祷悼叨帱忉氘焘纛"}; 
const unsigned char PY_mb_de[]=   {"的得地德底锝"}; 
const unsigned char PY_mb_deng[]= {"等灯登邓澄蹬瞪凳噔嶝戥磴镫簦"}; 
const unsigned char PY_mb_di[]=   {"的地第低敌底提帝抵滴弟递堤迪笛狄涤翟嫡蒂缔氐籴诋谛邸坻荻嘀娣绨柢棣觌砥碲睇镝羝骶"}; 
const unsigned char PY_mb_dia[]=  {""}; 
const unsigned char PY_mb_dian[]=  {"电点垫典店颠淀掂滇碘靛佃甸惦奠殿阽坫巅玷钿癜癫簟踮"}; 
const unsigned char PY_mb_diao[]=  {"调掉吊鸟碉叼雕凋刁钓铞铫貂鲷"}; 
const unsigned char PY_mb_die[]=  {"迭跌爹碟蝶谍叠垤堞揲喋牒瓞耋踮蹀鲽"}; 
const unsigned char PY_mb_ding[]=  {"定顶钉丁订盯叮鼎锭仃啶玎腚碇町铤疔耵酊"}; 
const unsigned char PY_mb_diu[]=  {"丢铥"}; 
const unsigned char PY_mb_dong[]=  {"动东冬懂洞冻董栋侗恫垌咚岽峒氡胨胴硐鸫"}; 
const unsigned char PY_mb_dou[]=  {"斗都豆读兜抖陡逗痘蔸窦蚪篼"}; 
const unsigned char PY_mb_du[]=  {"度都毒独读渡杜堵镀顿督犊睹赌肚妒芏嘟渎椟牍蠹笃髑黩"}; 
const unsigned char PY_mb_duan[]=  {"断端段短锻缎椴煅簖"}; 
const unsigned char PY_mb_dui[]=   {"对队堆敦兑怼憝碓"}; 
const unsigned char PY_mb_dun[]=  {"盾吨顿蹲敦墩囤钝遁沌炖砘礅盹镦趸"}; 
const unsigned char PY_mb_duo[]=  {"多度夺朵掇哆垛躲跺舵剁惰堕驮咄哚沲缍柁铎裰踱"}; 
const unsigned char PY_mb_e[]=   {"恶额恩俄耳饵蛾饿峨鹅讹娥厄扼遏鄂噩谔垩苊莪萼呃愕屙婀轭腭锇锷鹗颚鳄"}; 
const unsigned char PY_mb_ei[]=   {""}; 
const unsigned char PY_mb_en[]=   {"恩蒽摁"}; 
const unsigned char PY_mb_er[]=   {"而二尔儿耳饵洱贰佴迩珥铒鸸鲕"}; 
const unsigned char PY_mb_f[]=    {"分发范樊方冯反放复风防非封富翻"}; 
const unsigned char PY_mb_fa[]=   {"发法阀乏伐罚筏珐垡砝"}; 
const unsigned char PY_mb_fan[]=  {"反翻范犯饭繁泛番凡烦返藩帆樊矾钒贩蕃蘩幡梵燔畈蹯"}; 
const unsigned char PY_mb_fang[]=  {"方放防访房纺仿妨芳肪坊邡彷枋钫舫鲂"}; 
const unsigned char PY_mb_fei[]=  {"非肥飞费废肺沸菲匪啡诽吠芾狒悱淝妃绯榧腓斐扉镄痱蜚篚翡霏鲱"}; 
const unsigned char PY_mb_fen[]=  {"分粉奋份粪纷芬愤酚吩氛坟焚汾忿偾瀵玢棼鲼鼢"}; 
const unsigned char PY_mb_feng[]=  {"风封蜂丰缝峰锋疯奉枫烽逢冯讽凤俸酆葑唪沣砜"}; 
const unsigned char PY_mb_fo[]=   {""}; 
const unsigned char PY_mb_fou[]=   {"否缶"}; 
const unsigned char PY_mb_fu[]=   {"复服副府夫负富附福伏符幅腐浮辅付腹妇孵覆扶辐傅佛缚父弗甫肤氟敷拂俘涪袱抚俯釜斧脯腑赴赋阜讣咐匐凫郛芙芾苻茯莩菔拊呋幞怫滏艴孚驸绂绋桴赙祓砩黻黼罘稃馥蚨蜉蝠蝮麸趺跗鲋鳆"}; 
const unsigned char PY_mb_g[]=   {"个国工过高郭戈葛耿巩龚甘干古贾谷顾关管各革公根更改光广果格共搞"}; 
const unsigned char PY_mb_ga[]=   {"夹噶嘎胳尬尕尜旮钆"}; //来 自 :ST_M8._C N
const unsigned char PY_mb_gai[]=   {"改该盖概钙溉芥丐陔垓戤赅"}; 
const unsigned char PY_mb_gan[]=  {"干杆感敢赶甘肝秆柑竿赣乾坩苷尴擀泔淦澉绀橄旰矸疳酐"}; 
const unsigned char PY_mb_gang[]=  {"刚钢缸纲岗港杠冈肛扛戆罡筻"}; 
const unsigned char PY_mb_gao[]=   {"高搞告稿膏篙皋羔糕镐睾诰郜藁缟槔槁杲锆"}; 
const unsigned char PY_mb_ge[]=   {"个各革合格割歌隔盖哥葛铬阁戈搁鸽胳疙蛤咯屹鬲仡哿圪塥嗝纥搿膈硌镉袼颌虼舸骼"}; 
const unsigned char PY_mb_gei[]=  {""}; 
const unsigned char PY_mb_gen[]=  {"根跟亘茛哏艮"}; 
const unsigned char PY_mb_geng[]= {"更耕颈庚羹埂耿梗哽赓绠鲠"}; 
const unsigned char PY_mb_gong[]= {"工公共供功攻红巩贡汞宫恭龚躬弓拱珙肱蚣觥"}; 
const unsigned char PY_mb_gou[]=  {"够构沟句狗钩勾购苟垢佝诟岣遘媾缑枸觏彀笱篝鞲"}; 
const unsigned char PY_mb_gu[]=  {"鼓固古骨故顾股谷估雇孤姑贾辜菇咕箍沽蛊嘏诂菰呱崮汩梏轱牯牿臌毂瞽罟钴锢鸪鹄痼蛄酤觚鲴鹘"}; 
const unsigned char PY_mb_gua[]=  {"挂刮瓜括剐寡褂卦诖呱栝胍鸹"}; 
const unsigned char PY_mb_guai[]=  {"怪乖拐掴"}; 
const unsigned char PY_mb_guan[]= {"关管观官灌贯惯冠馆罐棺纶倌莞掼涫盥鹳矜鳏"}; 
const unsigned char PY_mb_guang[]={"光广逛咣犷桄胱"}; 
const unsigned char PY_mb_gui[]=  {"规贵归硅鬼轨龟桂瑰圭闺诡癸柜跪刽傀炔匦刿庋宄妫桧炅晷皈簋鲑鳜"}; 
const unsigned char PY_mb_gun[]=  {"滚辊棍衮绲磙鲧"}; 
const unsigned char PY_mb_guo[]=  {"国过果锅郭涡裹馘埚掴呙帼崞猓椁虢聒蜾蝈"}; 
const unsigned char PY_mb_h[]=   {"和会后何黄胡洪侯贺霍扈韩华郝化好合还活很回号毫花或海话红火害"}; 
const unsigned char PY_mb_ha[]=   {"哈蛤虾铪"}; 
const unsigned char PY_mb_hai[]=   {"还海害孩骸氦亥骇嘿咳嗨胲醢"}; 
const unsigned char PY_mb_han[]=   {"含焊旱喊汉寒汗函韩酣憨邯涵罕翰撼捍憾悍邗菡撖阚瀚晗焓顸颔蚶鼾"}; 
const unsigned char PY_mb_hang[]= {"行航夯杭吭巷沆绗珩颃"}; 
const unsigned char PY_mb_hao[]=   {"好号毫耗豪郝浩镐壕嚎貉蒿薅嗥嚆濠灏昊皓颢蚝"}; 
const unsigned char PY_mb_he[]=   {"和合河何核赫荷褐喝贺呵禾吓盒菏貉阂涸鹤诃劾壑嗬阖纥曷盍颌蚵翮"}; 
const unsigned char PY_mb_hei[]=   {"黑嘿嗨"}; 
const unsigned char PY_mb_hen[]=  {"很狠痕恨"}; 
const unsigned char PY_mb_heng[]= {"横衡恒哼亨蘅行珩桁"}; 
const unsigned char PY_mb_hong[]=  {"红洪轰烘哄虹鸿宏弘黉訇讧荭蕻薨闳泓"}; 
const unsigned char PY_mb_hou[]=  {"后候厚侯喉猴吼堠後逅瘊篌糇鲎骺"}; 
const unsigned char PY_mb_hu[]=  {"和护互湖呼户弧乎胡糊虎忽核瑚戏壶葫蝴狐唬沪冱唿囫岵猢怙惚浒滹琥槲轷觳烀煳戽扈祜瓠鹄鹕鹱笏醐斛"}; 
const unsigned char PY_mb_hua[]=  {"化花话划滑华画哗猾豁骅桦砉铧"}; 
const unsigned char PY_mb_huai[]=  {"坏怀划淮槐徊踝"}; 
const unsigned char PY_mb_huan[]= {"还环换欢缓患幻焕桓唤痪豢涣宦郇奂萑擐圜獾洹浣漶寰逭缳锾鲩鬟"}; 
const unsigned char PY_mb_huang[]= {"黄簧荒皇慌蝗磺凰惶煌晃幌恍谎隍徨湟潢遑璜肓癀蟥篁鳇"}; 
const unsigned char PY_mb_hui[]=  {"会回灰挥辉汇毁慧恢绘惠徽溃堕徊蛔悔卉晦贿秽烩讳诲诙茴荟蕙咴哕喙隳洄浍彗缋珲桧晖恚虺蟪麾"}; 
const unsigned char PY_mb_hun[]=  {"混浑荤昏婚魂诨馄阍溷"}; 
const unsigned char PY_mb_huo[]=  {"和活或火货获伙霍豁惑祸劐藿攉嚯夥钬锪镬耠蠖"}; 
const unsigned char PY_mb_j[]=   {"级贾江蒋姜焦金靳晋就进加经家结阶间件及解较机军接教极九见"}; 
const unsigned char PY_mb_ji[]=   {"级及机极几积给基其记己期系革计集即际季激济技击继急剂既纪寄挤鸡迹绩齐奇吉脊辑籍疾肌棘畸圾稽箕饥讥姬缉汲嫉蓟冀伎祭悸寂忌妓藉丌亟乩剞佶偈诘墼芨芰荠蒺蕺掎叽咭哜唧岌嵴洎屐骥畿玑楫殛戟戢赍觊犄齑矶羁嵇稷瘠虮笈笄暨跻跽霁鲚鲫髻麂"}; 
const unsigned char PY_mb_jia[]=  {"加家架价甲夹假钾贾稼驾嘉枷佳荚颊嫁茄挟嘏伽郏葭岬浃迦珈戛胛恝铗镓痂瘕袷蛱笳袈跏"}; 
const unsigned char PY_mb_jian[]=  {"间件见建坚减检践尖简碱剪艰渐肩键健柬鉴剑歼监兼浅奸箭茧舰俭笺煎缄硷拣捡荐槛贱饯溅涧僭谏谫菅蒹搛囝湔蹇謇缣枧楗戋戬牮犍毽腱睑锏鹣裥笕翦趼踺鲣鞯"}; 
const unsigned char PY_mb_jiang[]= {"将降讲强江浆蒋奖疆僵姜桨匠酱茳洚绛缰犟礓耩糨豇"}; 
const unsigned char PY_mb_jiao[]= {"较教交角叫脚胶浇焦觉校蕉搅酵郊铰窖椒礁骄娇嚼矫侥狡饺缴绞剿轿佼僬艽茭挢噍峤徼姣敫皎鹪蛟醮跤鲛"}; 
const unsigned char PY_mb_jie[]=  {"结阶解接节家界截介借价届街揭洁杰竭皆秸劫桔捷睫姐戒藉芥疥诫楷偈讦诘拮喈嗟婕孑桀碣疖颉蚧羯鲒骱"}; 
const unsigned char PY_mb_jin[]= {"进金近紧斤今尽仅劲浸禁津筋锦晋巾襟谨靳烬卺荩堇噤馑廑妗缙瑾槿赆觐衿矜"}; 
const unsigned char PY_mb_jing[]= {"经精京径井静竟晶净境镜景警劲茎敬惊睛竞荆兢鲸粳痉靖刭儆阱菁獍憬泾迳弪婧肼胫腈旌靓"}; 
const unsigned char PY_mb_jiong[]= {"炯窘迥炅扃"}; 
const unsigned char PY_mb_jiu[]=  {"就九旧究久救酒纠揪玖韭灸厩臼舅咎疚僦啾阄柩桕鸠鹫赳鬏"}; 
const unsigned char PY_mb_ju[]=   {"具据局举车句聚距巨居锯剧矩拒柜桔鞠拘狙疽驹菊咀沮踞俱惧炬倨讵苣苴莒掬遽屦琚枸椐榘榉橘犋飓钜锔窭裾趄醵踽龃雎瞿鞫"}; 
const unsigned char PY_mb_juan[]=  {"卷捐鹃娟倦眷绢俊鄄狷涓桊蠲锩镌隽"}; 
const unsigned char PY_mb_jue[]=   {"决觉绝角脚掘嚼撅攫抉倔爵诀厥劂谲矍蕨嗟噘噱崛獗孓珏桷橛爝镢蹶觖巨额"}; 
const unsigned char PY_mb_jun[]=   {"军均菌君龟钧峻俊竣浚郡骏捃皲筠麇"}; 
const unsigned char PY_mb_k[]=   {"可开看蒯克孔邝寇科口空苦快考刻靠况块困宽矿抗卡"}; 
const unsigned char PY_mb_ka[]=   {"卡喀咖咯佧咔胩"}; 
const unsigned char PY_mb_kai[]=   {"开凯揩楷慨剀垲蒈忾恺铠锎锴"}; 
const unsigned char PY_mb_kan[]=  {"看刊坎槛堪勘砍嵌侃莰阚戡龛瞰"}; 
const unsigned char PY_mb_kang[]= {"抗康炕慷糠扛亢伉闶钪"}; 
const unsigned char PY_mb_kao[]=  {"考靠拷烤尻栲犒铐"}; 
const unsigned char PY_mb_ke[]=  {"可克科刻客壳颗棵柯呵坷苛磕咳渴课嗑岢恪溘骒缂珂轲氪瞌钶锞稞疴窠颏蝌髁"}; 
const unsigned char PY_mb_ken[]= {"肯啃垦恳裉"}; 
const unsigned char PY_mb_keng[]= {"坑吭铿"}; 
const unsigned char PY_mb_kong[]= {"孔空控恐倥崆箜"}; 
const unsigned char PY_mb_kou[]=  {"口扣抠寇芤蔻叩眍筘"}; 
const unsigned char PY_mb_ku[]=  {"苦库枯酷哭窟裤刳堀喾绔骷"}; 
const unsigned char PY_mb_kua[]=  {"跨夸垮挎胯侉"}; 
const unsigned char PY_mb_kuai[]=  {"会快块筷侩蒯郐哙狯浍脍"}; 
const unsigned char PY_mb_kuan[]= {"宽款髋"}; 
const unsigned char PY_mb_kuang[]= {"况矿狂框匡筐眶旷诓诳邝圹夼哐纩贶"}; 
const unsigned char PY_mb_kui[]=  {"奎溃馈亏盔岿窥葵魁傀愧馗匮夔隗蒉揆喹喟悝愦逵暌睽聩蝰篑跬"}; 
const unsigned char PY_mb_kun[]=  {"困昆坤捆悃阃琨锟醌鲲髡"}; 
const unsigned char PY_mb_kuo[]=  {"扩括适阔廓栝蛞"}; 
const unsigned char PY_mb_l[]=   {"了来赖罗吕刘鲁李林雷廖卢梁厉廉陆龙黎鹿量理路里论两利领流力立料连老六轮类列"}; 
const unsigned char PY_mb_la[]=   {"拉落啦蜡腊蓝垃喇辣剌邋旯砬瘌"}; 
const unsigned char PY_mb_lai[]=   {"来赖莱崃徕涞濑赉睐铼癞籁"}; 
const unsigned char PY_mb_lan[]=  {"兰烂蓝览栏婪拦篮阑澜谰揽懒缆滥岚漤榄斓罱镧褴"}; 
const unsigned char PY_mb_lang[]= {"浪朗郎狼琅榔廊莨蒗啷阆锒稂螂"}; 
const unsigned char PY_mb_lao[]= {"老劳落牢涝捞络佬姥酪烙潦唠崂栳铑铹痨耢醪"}; 
const unsigned char PY_mb_le[]=   {"了乐勒肋仂叻泐鳓"}; 
const unsigned char PY_mb_lei[]=  {"类雷累勒垒泪镭蕾磊儡擂肋羸诔嘞嫘缧檑耒酹"}; 
const unsigned char PY_mb_leng[]=  {"冷棱楞塄愣"}; 
const unsigned char PY_mb_li[]=  {"理里利力立离例历粒厘礼李隶黎璃励犁梨丽厉篱狸漓鲤莉荔吏栗砾傈俐痢沥哩鬲俪俚郦坜苈莅蓠藜呖唳喱猁悝溧澧逦娌嫠骊缡枥栎轹戾砺詈罹锂鹂疠疬蛎蜊蠡笠篥粝醴跞雳鲡鳢黧"}; 
const unsigned char PY_mb_lia[]=  {""}; 
const unsigned char PY_mb_lian[]=  {"连联练炼脸链莲镰廉怜涟帘敛恋蔹奁潋濂琏楝殓臁裢裣蠊鲢立案"}; 
const unsigned char PY_mb_liang[]= {"量两粮良亮梁凉辆粱晾谅墚莨椋踉靓魉"}; 
const unsigned char PY_mb_liao[]=  {"了料疗辽僚撩聊燎寥潦撂镣廖蓼尥嘹獠寮缭钌鹩"}; 
const unsigned char PY_mb_lie[]=  {"列裂烈劣猎冽埒捩咧洌趔躐鬣"}; 
const unsigned char PY_mb_lin[]=  {"林磷临邻淋麟琳霖鳞凛赁吝蔺啉嶙廪懔遴檩辚膦瞵粼躏"}; 
const unsigned char PY_mb_ling[]= {"领另零令灵岭铃龄凌棱陵拎玲菱伶羚酃苓呤囹泠绫柃棂瓴聆蛉翎鲮"}; 
const unsigned char PY_mb_liu[]=  {"流六留刘硫柳陆馏瘤溜琉榴碌浏遛骝绺旒熘锍镏鹨鎏"}; 
const unsigned char PY_mb_lo[]=  {""}; 
const unsigned char PY_mb_long[]=  {"龙垄弄笼隆聋咙窿拢陇垅茏泷珑栊胧砻癃"}; 
const unsigned char PY_mb_lou[]=  {"漏露楼娄搂篓陋偻蒌喽嵝镂瘘耧蝼髅"}; 
const unsigned char PY_mb_lu[]=  {"路录陆炉露芦卢颅庐掳卤虏鲁麓碌赂鹿潞禄戮垆撸噜泸渌漉逯璐栌橹轳辂辘氇胪镥鸬鹭簏舻鲈六绿"}; 
const unsigned char PY_mb_luan[]=  {"卵乱峦挛孪滦脔娈栾鸾銮"}; 
const unsigned char PY_mb_lue[]=  {"略掠锊"}; 
const unsigned char PY_mb_lun[]=  {"论轮伦抡仑沦纶囵"}; 
const unsigned char PY_mb_luo[]=   {"落罗螺洛络逻咯烙萝锣箩骡裸骆倮蠃荦捋摞猡泺漯珞椤脶硌镙瘰雒"}; 
const unsigned char PY_mb_lv[]=   {"率律旅虑驴吕铝侣履屡缕氯滤绿捋闾榈膂稆褛偻"}; 
const unsigned char PY_mb_m[]=   {"面命马孟穆梅糜们民毛茅苗莫没米明么每门名磨美密满亩目呒"}; 
const unsigned char PY_mb_ma[]=   {"马么麻吗妈骂嘛码摩抹玛蚂唛犸嬷杩蟆"}; 
const unsigned char PY_mb_mai[]=   {"麦脉卖买埋迈劢荬霾"}; 
const unsigned char PY_mb_man[]=  {"满慢曼漫蔓瞒馒蛮谩墁幔缦熳镘颟螨鳗鞔"}; 
const unsigned char PY_mb_mang[]= {"忙芒盲茫氓莽邙漭硭蟒"}; 
const unsigned char PY_mb_mao[]=   {"毛矛冒貌贸帽猫茅锚铆卯茂袤茆峁泖瑁昴牦耄旄懋瞀蟊髦"}; 
const unsigned char PY_mb_me[]=  {"么麽"}; 
const unsigned char PY_mb_mei[]= {"没每美煤霉酶梅妹眉玫枚媒镁昧寐媚糜谜莓嵋猸浼湄楣镅鹛袂魅"}; 
const unsigned char PY_mb_men[]=  {"们门闷扪焖懑钔"}; 
const unsigned char PY_mb_meng[]=  {"孟猛蒙盟梦萌锰氓檬勐甍瞢懵朦礞虻蜢蠓艋艨"}; 
const unsigned char PY_mb_mi[]=  {"米密迷蜜秘眯醚靡糜谜弥觅泌幂芈谧蘼咪嘧猕汨宓弭脒祢敉糸縻麋"}; 
const unsigned char PY_mb_mian[]=  {"面棉免绵眠冕勉娩缅沔渑湎腼眄"}; 
const unsigned char PY_mb_miao[]= {"苗秒描庙妙瞄藐渺喵邈缈缪杪淼眇鹋"}; 
const unsigned char PY_mb_mie[]=  {"灭蔑乜咩蠛篾"}; 
const unsigned char PY_mb_min[]=  {"民敏抿皿悯闽苠岷闵泯缗玟珉愍黾鳘"}; 
const unsigned char PY_mb_ming[]=  {"命明名鸣螟盟铭冥茗溟暝瞑酩"}; 
const unsigned char PY_mb_miu[]=  {"谬缪"}; 
const unsigned char PY_mb_mo[]=  {"无磨没万末模膜摸墨摩脉莫抹冒默貉嘿摹蘑魔沫漠寞陌谟茉蓦馍嫫殁镆秣瘼耱貊貘"}; 
const unsigned char PY_mb_mou[]=  {"某谋牟侔哞缪眸蛑蝥鍪"}; 
const unsigned char PY_mb_mu[]=   {"亩目木母墓模幕牧姆穆姥牟拇牡暮募慕睦仫坶苜沐毪钼"}; 
const unsigned char PY_mb_n[]=   {"年能内那聂农你南难呢女泥哪拿念牛宁脑粘尼纳嗯"}; 
const unsigned char PY_mb_na[]=   {"那南哪拿纳呢钠呐娜捺肭镎衲"}; 
const unsigned char PY_mb_nai[]=  {"耐哪奶乃氖奈鼐艿萘柰"}; 
const unsigned char PY_mb_nan[]=  {"南难男喃囝囡楠腩蝻赧"}; 
const unsigned char PY_mb_nang[]= {"囊攮囔馕曩"}; 
const unsigned char PY_mb_nao[]=  {"脑闹努挠恼淖孬垴呶猱瑙硇铙蛲"}; 
const unsigned char PY_mb_ne[]=  {"呢哪呐讷"}; 
const unsigned char PY_mb_nei[]=  {"内那哪馁"}; 
const unsigned char PY_mb_nen[]=  {"嫩恁"}; 
const unsigned char PY_mb_neng[]= {""}; 
const unsigned char PY_mb_ni[]=  {"你泥尼呢逆拟尿妮霓倪匿腻溺伲坭猊怩昵旎祢慝睨铌鲵"}; 
const unsigned char PY_mb_nian[]= {"年念粘蔫拈碾撵捻酿廿埝辇黏鲇鲶"}; 
const unsigned char PY_mb_niang[]={"娘酿"}; 
const unsigned char PY_mb_niao[]=  {"尿鸟溺茑嬲脲袅"}; 
const unsigned char PY_mb_nie[]=  {"镍啮涅捏聂孽镊乜陧蘖嗫颞臬蹑"}; 
const unsigned char PY_mb_nin[]=  {"您恁"}; 
const unsigned char PY_mb_ning[]= {"宁凝拧柠狞泞佞苎咛甯聍"}; 
const unsigned char PY_mb_niu[]=  {"牛扭钮纽拗狃忸妞"}; 
const unsigned char PY_mb_nong[]= {"农弄浓脓侬哝"}; 
const unsigned char PY_mb_nou[]=  {""}; 
const unsigned char PY_mb_nu[]=  {"努奴怒弩胬孥驽"}; 
const unsigned char PY_mb_nuan[]=  {""}; 
const unsigned char PY_mb_nuo[]=   {"诺娜挪懦糯傩搦喏锘"}; 
const unsigned char PY_mb_nv[]=  {"女恧钕衄"}; 
const unsigned char PY_mb_nve[]=  {"虐疟"}; 
const unsigned char PY_mb_o[]=  {"哦喔噢欧偶鸥殴藕呕怄耦"}; 
const unsigned char PY_mb_ou[]=  {"区欧偶鸥殴藕呕沤讴怄瓯耦"}; 
const unsigned char PY_mb_p[]=   {"批平判潘彭庞裴蒲配片派破排品皮喷盘偏评怕培普贫跑炮"}; 
const unsigned char PY_mb_pa[]=  {"怕派爬帕扒耙啪趴琶葩杷钯筢"}; 
const unsigned char PY_mb_pai[]=  {"派排拍牌迫哌徘湃俳蒎"}; 
const unsigned char PY_mb_pan[]=  {"判盘叛番潘攀磐盼畔胖拚爿泮袢襻蟠蹒"}; 
const unsigned char PY_mb_pang[]= {"旁膀磅乓庞耪胖彷滂逄螃"}; 
const unsigned char PY_mb_pao[]=  {"跑炮刨抛泡咆袍匏狍庖脬疱"}; 
const unsigned char PY_mb_pei[]=  {"配培陪胚呸裴赔佩沛辔帔旆锫醅霈"}; 
const unsigned char PY_mb_pen[]=  {"喷盆湓"}; 
const unsigned char PY_mb_peng[]= {"碰棚蓬朋捧膨砰抨烹澎彭硼篷鹏堋嘭怦蟛"}; 
const unsigned char PY_mb_pi[]=  {"批皮坏否辟坯脾疲砒霹披劈琵毗啤匹痞僻屁譬丕仳陂陴邳郫圮埤鼙芘擗吡噼庀淠媲纰枇甓睥罴铍癖裨疋蚍蜱貔"}; 
const unsigned char PY_mb_pian[]=  {"片偏便篇骗扁谝骈缏犏胼翩蹁"}; 
const unsigned char PY_mb_piao[]=  {"票漂朴飘瓢剽莩嘌嫖骠缥殍瞟螵"}; 
const unsigned char PY_mb_pie[]=  {"撇瞥丿苤氕"}; 
const unsigned char PY_mb_pin[]=  {"品贫频拼苹聘拚姘嫔榀牝颦"}; 
const unsigned char PY_mb_ping[]= {"平评瓶凭苹冯乒坪萍屏俜娉枰鲆冖"}; 
const unsigned char PY_mb_po[]=  {"破迫坡泼繁朴泊颇婆魄粕叵陂鄱泺珀攴钋钷钹皤笸"}; 
const unsigned char PY_mb_pou[]=  {"剖裒掊"}; 
const unsigned char PY_mb_pu[]=   {"普谱扑埔铺暴葡朴蒲堡脯仆莆菩圃浦曝瀑匍噗溥濮璞氆镤镨蹼"}; 
const unsigned char PY_mb_q[]=   {"起前其钱乔齐祁秦屈邱戚瞿去气全期群情区强切取七求清确权且青"}; 
const unsigned char PY_mb_qi[]=  {"起其气期七器齐奇汽企漆欺旗畦启弃歧稽缉栖戚妻凄柒沏棋崎脐祈祁骑岂乞契砌迄泣讫亟亓俟圻芑芪荠萁萋葺蕲嘁屺岐岖汔淇骐绮琪琦杞桤槭耆欹祺憩碛颀蛴蜞綦綮蹊鳍麒"}; 
const unsigned char PY_mb_qia[]=  {"卡恰掐洽伽葜袷髂"}; 
const unsigned char PY_mb_qian[]= {"前千钱浅签迁铅潜牵钳纤谴扦钎仟谦乾黔遣堑嵌欠歉倩佥阡芊芡茜荨掮岍悭慊骞搴褰缱椠犍肷愆钤虔箬箝"}; 
const unsigned char PY_mb_qiang[]= {"强将枪抢墙腔呛羌蔷戕嫱樯戗炝锖锵镪襁蜣羟跄"}; 
const unsigned char PY_mb_qiao[]=  {"桥瞧壳巧敲乔蕉橇锹悄侨鞘撬翘峭俏窍雀劁诮谯荞峤愀憔缲樵硗跷鞒"}; 
const unsigned char PY_mb_qie[]=  {"切且砌茄怯窃伽郄惬慊妾挈锲箧"}; 
const unsigned char PY_mb_qin[]=   {"亲侵勤秦钦琴芹擒禽寝沁芩揿吣嗪噙廑溱檎锓矜覃螓衾"}; 
const unsigned char PY_mb_qing[]= {"情清青轻倾请亲庆氢晴卿擎氰顷苘圊檠磬蜻罄箐綮謦鲭黥"}; 
const unsigned char PY_mb_qiong[]= {"穷琼邛茕穹蛩筇跫銎"}; 
const unsigned char PY_mb_qiu[]=  {"求球秋丘仇龟邱囚酋泅俅巯犰湫逑遒楸赇虬蚯蝤裘糗鳅鼽"}; 
const unsigned char PY_mb_qu[]=  {"去区取曲且渠屈趋驱趣蛆躯娶龋戌诎劬苣蕖蘧岖衢阒璩觑氍朐祛磲鸲癯蛐蠼麴瞿黢"}; 
const unsigned char PY_mb_quan[]=  {"全权圈劝泉醛颧痊拳犬券诠荃悛绻辁畎铨蜷筌鬈"}; 
const unsigned char PY_mb_que[]=  {"确却缺炔瘸鹊榷雀阕阙悫"}; 
const unsigned char PY_mb_qun[]=  {"群裙逡"}; 
const unsigned char PY_mb_r[]=   {"人如日阮荣认入任热然容让润弱燃染壤绕仁溶刃仍"}; 
const unsigned char PY_mb_ran[]=  {"然燃染冉苒蚺髯"}; 
const unsigned char PY_mb_rang[]=  {"让壤嚷瓤攘禳穰"}; 
const unsigned char PY_mb_rao[]=   {"绕扰饶荛娆桡"}; 
const unsigned char PY_mb_re[]=   {"热若惹"}; 
const unsigned char PY_mb_ren[]=   {"人认任仁刃忍壬韧妊纫仞荏葚饪轫稔衽"}; 
const unsigned char PY_mb_reng[]=  {"仍扔"}; 
const unsigned char PY_mb_ri[]=   {""}; 
const unsigned char PY_mb_rong[]=  {"容溶荣熔融绒戎茸蓉冗嵘狨榕肜蝾"}; 
const unsigned char PY_mb_rou[]=  {"肉揉柔糅蹂鞣"}; 
const unsigned char PY_mb_ru[]=   {"如入儒乳茹蠕孺辱汝褥蓐薷嚅洳溽濡缛铷襦颥"}; 
const unsigned char PY_mb_ruan[]=  {"软阮朊"}; 
const unsigned char PY_mb_rui[]=   {"瑞锐蕊芮蕤枘睿蚋"}; 
const unsigned char PY_mb_run[]=  {"润闰"}; 
const unsigned char PY_mb_ruo[]=   {"弱若偌箬"}; 
const unsigned char PY_mb_s[]=   {"是上时孙宋苏沈粟施邵佘申师帅沙隋石史生说社深水所三十使事数四实少式山手"}; 
const unsigned char PY_mb_sa[]=    {"撒萨洒卅仨挲脎飒"}; 
const unsigned char PY_mb_sai[]=  {"塞思赛腮鳃噻"}; 
const unsigned char PY_mb_san[]=  {"三散叁伞馓毵糁"}; 
const unsigned char PY_mb_sang[]=  {"桑丧嗓搡磉颡"}; 
const unsigned char PY_mb_sao[]=   {"扫梢搔骚嫂埽缫缲臊瘙鳋"}; 
const unsigned char PY_mb_se[]=  {"色塞瑟涩啬铯穑"}; 
const unsigned char PY_mb_sen[]=  {""}; 
const unsigned char PY_mb_seng[]= {""}; 
const unsigned char PY_mb_sh[]=   {"数厦山删商少召社设甚声市师始手收守书属术输双水谁睡税顺"}; 
const unsigned char PY_mb_sha[]=  {"沙杀砂啥纱莎刹傻煞杉厦唼嗄挲歃铩痧裟霎鲨"}; 
const unsigned char PY_mb_shai[]=  {"色筛晒"}; 
const unsigned char PY_mb_shan[]= {"山单闪善珊扇陕掸苫杉删煽衫擅赡膳汕缮栅剡讪鄯埏芟潸姗嬗骟膻禅钐疝蟮舢跚鳝"}; 
const unsigned char PY_mb_shang[]= {"上商伤尚汤墒赏晌裳垧绱殇熵觞"}; 
const unsigned char PY_mb_shao[]= {"少烧稍绍召哨梢鞘捎芍勺韶邵劭苕潲杓蛸筲艄"}; 
const unsigned char PY_mb_she[]=  {"社设射摄舌折涉舍蛇奢赊赦慑厍佘摺猞滠歙畲麝"}; 
const unsigned char PY_mb_shen[]=  {"深身神什伸参甚渗沈肾审申慎砷呻娠绅婶诜谂莘葚哂渖椹胂矧蜃"}; 
const unsigned char PY_mb_sheng[]= {"生胜声省升盛绳剩圣牲乘甥嵊渑晟眚笙"}; 
const unsigned char PY_mb_shi[]=   {"是时十使事实式识世试石什示市史师始施士势湿适食失视室氏似蚀诗释殖拾饰驶匙狮尸虱矢屎柿拭誓逝嗜噬仕侍恃嘘峙谥埘莳蓍弑轼贳炻铈螫舐筮酾豕鲥鲺礻饣"}; 
const unsigned char PY_mb_shou[]=  {"手受收首守熟授寿兽售瘦狩绶艏"}; 
const unsigned char PY_mb_shu[]=  {"数书树属术输述熟束鼠疏殊舒蔬薯叔署枢梳抒淑赎孰暑曙蜀黍戍竖墅庶漱恕俞丨倏塾菽摅沭澍姝纾毹腧殳秫"}; 
const unsigned char PY_mb_shua[]= {"刷耍唰"}; 
const unsigned char PY_mb_shuai[]= {"衰帅摔甩蟀"}; 
const unsigned char PY_mb_shuan[]= {"栓拴闩涮"}; 
const unsigned char PY_mb_shuang[]={"双霜爽泷孀"}; 
const unsigned char PY_mb_shui[]= {"水说谁睡税"}; 
const unsigned char PY_mb_shun[]=  {"顺吮瞬舜"}; 
const unsigned char PY_mb_shuo[]=  {"说数硕朔烁蒴搠妁槊铄"}; 
const unsigned char PY_mb_si[]=  {"四思死斯丝似司饲食私厕撕嘶肆寺嗣伺巳厮俟兕厶咝汜泗澌姒驷缌祀锶鸶耜蛳笥"}; 
const unsigned char PY_mb_song[]=  {"松送宋颂耸怂讼诵凇菘崧嵩忪悚淞竦"}; 
const unsigned char PY_mb_sou[]=  {"搜艘擞嗽叟薮嗖嗾馊溲飕瞍锼螋"}; 
const unsigned char PY_mb_su[]=  {"素速苏塑缩俗诉宿肃酥粟僳溯夙谡蔌嗉愫涑簌觫稣"}; 
const unsigned char PY_mb_suan[]=  {"算酸蒜狻"}; 
const unsigned char PY_mb_sui[]=  {"随穗碎虽岁尿隋绥髓遂隧祟谇荽濉邃燧眭睢"}; 
const unsigned char PY_mb_sun[]=  {"损孙笋荪狲飧榫隼"}; 
const unsigned char PY_mb_suo[]=  {"所缩锁索莎蓑梭唆琐唢嗦嗍娑桫挲睃羧"}; 
const unsigned char PY_mb_t[]=  {"他同它唐谭陶汤童涂田佟提题体图天头通条特土团统台她太套铁"}; 
const unsigned char PY_mb_ta[]=  {"他它她塔踏塌獭挞蹋拓嗒闼溻漯遢榻沓铊趿鳎"}; 
const unsigned char PY_mb_tai[]= {"台太态胎抬泰苔酞汰邰薹呔骀肽炱钛跆鲐"}; 
const unsigned char PY_mb_tan[]= {"谈碳探炭弹坦贪滩坍摊瘫坛檀痰潭谭毯袒叹郯澹昙忐钽锬镡"}; 
const unsigned char PY_mb_tang[]= {"堂糖唐塘汤搪棠膛倘躺淌趟烫傥帑溏瑭樘铴镗耥螗螳羰醣"}; 
const unsigned char PY_mb_tao[]= {"套讨逃陶萄桃掏涛滔绦淘鼗叨啕洮韬焘饕"}; 
const unsigned char PY_mb_te[]=  {"特忒忑慝铽"}; 
const unsigned char PY_mb_teng[]= {"腾疼藤誊滕"}; 
const unsigned char PY_mb_ti[]= {"提题体替梯惕剔踢锑蹄啼嚏涕剃屉倜荑悌逖绨缇鹈裼醍扌"}; 
const unsigned char PY_mb_tian[]=  {"天田添填甜佃恬舔腆掭忝阗殄畋"}; 
const unsigned char PY_mb_tiao[]= {"条调跳挑迢眺佻苕祧窕蜩笤粜龆鲦髫"}; 
const unsigned char PY_mb_tie[]= {"铁贴帖萜餮"}; 
const unsigned char PY_mb_ting[]= {"听停庭挺廷厅烃汀亭艇莛葶婷梃町铤蜓霆"}; 
const unsigned char PY_mb_tong[]= {"同通统铜痛筒童桶侗恫桐酮瞳彤捅佟仝垌茼嗵峒恸潼砼"}; 
const unsigned char PY_mb_tou[]=  {"头投透偷钭骰"}; 
const unsigned char PY_mb_tu[]=  {"图土突途徒凸涂吐兔屠秃堍荼菟钍酴"}; 
const unsigned char PY_mb_tuan[]=  {"团湍抟彖疃图案"}; 
const unsigned char PY_mb_tui[]=  {"推退腿颓蜕褪忒煺"}; 
const unsigned char PY_mb_tun[]=  {"囤褪吞屯臀氽饨暾豚"}; 
const unsigned char PY_mb_tuo[]=   {"脱拖托妥椭舵魄鸵陀驮驼拓唾乇佗坨庹沱柝柁橐砣铊箨酡跎鼍"}; 
const unsigned char PY_mb_w[]=  {"为我无王汪卫魏吴韦闻乌邬翁温伍问外五位物委完温万文往武务围误晚"}; 
const unsigned char PY_mb_wa[]=  {"瓦挖凹哇蛙洼娃袜佤娲腽"}; 
const unsigned char PY_mb_wai[]=  {"外歪崴"}; 
const unsigned char PY_mb_wan[]=  {"完万晚弯碗顽湾挽玩蔓娩豌丸烷皖惋宛婉腕剜芄莞菀纨绾琬脘畹蜿"}; 
const unsigned char PY_mb_wang[]=  {"往王望网忘妄亡旺芒汪枉罔尢惘辋魍"}; 
const unsigned char PY_mb_wei[]=  {"为位委围维唯卫微伟未威危尾谓喂味胃魏伪遗违韦畏纬巍桅惟潍苇萎蔚渭尉慰偎诿隈隗圩葳薇囗帏帷崴嵬猥猬闱沩洧涠逶娓玮韪軎炜煨痿艉鲔"}; 
const unsigned char PY_mb_wen[]=  {"问温文稳纹闻蚊瘟吻紊刎阌汶璺雯亠"}; 
const unsigned char PY_mb_weng[]=  {"嗡翁瓮蓊蕹"}; 
const unsigned char PY_mb_wo[]=  {"我握窝蜗涡沃挝卧斡倭莴喔幄渥肟硪龌"}; 
const unsigned char PY_mb_wu[]=  {"无五物武务误伍舞污悟雾午恶屋乌吴亡诬钨巫呜芜梧吾毋捂侮坞戊晤勿兀仵阢邬圬芴唔庑怃忤浯寤迕妩婺骛杌牾於焐鹉鹜痦蜈鋈鼯"}; 
const unsigned char PY_mb_x[]=  {"学下行许徐邢萧肖薛熊解项习冼小线性新些想心向相系席现西修象先形"}; 
const unsigned char PY_mb_xi[]=  {"系席西习细吸析喜洗铣稀戏隙希息袭锡烯牺悉惜溪腊栖昔熙硒矽晰嘻膝夕熄汐犀檄媳僖兮隰郗茜菥葸蓰奚唏徙饩阋浠淅屣嬉玺樨曦觋欷歙熹禊禧皙穸裼蜥螅蟋舄舾羲粞翕醯蹊鼷"}; 
const unsigned char PY_mb_xia[]=  {"下夏吓狭霞唬瞎虾匣辖暇峡侠厦呷狎遐瑕柙硖瘕罅黠"}; 
const unsigned char PY_mb_xian[]= {"线现先县限见显鲜献险陷宪纤洗掀弦铣腺锨仙咸贤衔舷闲涎嫌馅羡冼苋莶藓岘猃暹娴氙燹祆鹇痫蚬筅籼酰跣跹霰"}; 
const unsigned char PY_mb_xiang[]= {"想向相象响项箱乡降香像详橡享湘厢镶襄翔祥巷芗葙饷庠骧缃蟓鲞飨"}; 
const unsigned char PY_mb_xiao[]= {"小消削效笑校销硝萧肖孝霄哮嚣宵淆晓啸哓崤潇逍骁绡枭枵蛸筱箫魈"}; 
const unsigned char PY_mb_xie[]=  {"些解写斜谢协械叶血卸屑鞋歇邪胁蟹泄泻契楔蝎挟携谐懈偕亵勰燮薤撷獬廨渫瀣邂绁缬榭榍颉躞"}; 
const unsigned char PY_mb_xin[]=  {"新心信锌芯辛寻欣薪忻衅囟馨昕歆镡鑫"}; 
const unsigned char PY_mb_xing[]= {"行性形型星兴省醒姓幸腥猩惺刑邢杏陉荇荥擤饧悻硎"}; 
const unsigned char PY_mb_xiong[]= {"雄胸兄凶熊匈汹芎"}; 
const unsigned char PY_mb_xiu[]=  {"修锈休袖秀朽宿臭羞嗅绣咻岫馐庥溴鸺貅髹"}; 
const unsigned char PY_mb_xu[]=   {"续许须需序虚絮畜叙蓄绪徐墟戌嘘酗旭恤婿吁诩勖圩蓿洫浒溆顼栩煦砉盱胥糈醑"}; 
const unsigned char PY_mb_xuan[]=  {"选旋宣悬玄券轩喧癣眩绚儇谖萱揎泫渲漩璇楦暄炫煊碹铉镟痃"}; 
const unsigned char PY_mb_xue[]=  {"学血削雪穴靴薛谑噱泶踅鳕"}; 
const unsigned char PY_mb_xun[]=  {"训旬迅讯寻循巡荤浚勋熏询驯殉汛逊巽郇埙荀蕈薰峋徇獯恂洵浔曛窨醺鲟彐"}; 
const unsigned char PY_mb_y[]=    {"一有杨严余阎姚颜袁燕俞岳恽乐叶羊尹尤用要以于也样义与由压员月意又运原油验"}; 
const unsigned char PY_mb_ya[]=   {"压亚呀牙芽雅蚜鸭匹押鸦丫崖衙涯哑讶伢垭揠岈迓娅琊桠氩砑睚痖"}; 
const unsigned char PY_mb_yan[]=   {"验研严颜眼言盐演岩沿烟延掩宴炎燕衍铅焉咽阉淹蜒阎奄艳堰厌砚雁唁彦焰谚殷厣赝剡俨偃兖谳阽郾鄢芫菸崦恹闫阏湮滟妍嫣琰檐晏胭腌焱罨筵酽魇餍鼹"}; 
const unsigned char PY_mb_yang[]=  {"样养氧扬洋阳羊秧央杨仰殃鸯佯疡痒漾徉怏泱炀烊恙蛘鞅"}; 
const unsigned char PY_mb_yao[]=  {"要药约摇腰咬邀耀陶侥疟妖瑶尧遥窑谣姚舀钥夭爻吆崾徭幺珧杳轺曜肴铫鹞窈繇鳐"}; 
const unsigned char PY_mb_ye[]=   {"也业页叶液夜野爷冶邪哗咽椰噎耶掖曳腋拽靥谒邺揶晔烨铘"}; 
const unsigned char PY_mb_yi[]=   {"一以义意已移医议依易乙艺益异宜仪亿遗伊役衣疑亦谊翼译抑忆疫壹揖铱颐夷胰沂姨彝椅蚁倚矣邑屹臆逸肄裔毅溢诣翌绎刈劓仡佚佾诒圯埸懿苡荑薏弈奕挹弋呓咦咿嗌噫峄嶷猗饴怿怡悒漪迤驿缢殪轶贻欹旖熠眙钇镒镱痍瘗癔翊蜴舣羿翳酏黟衤"}; 
const unsigned char PY_mb_yin[]=  {"因引阴印音银烟隐饮荫茵殷姻吟淫寅尹胤鄞圻垠堙茚吲喑狺夤洇湮氤铟瘾窨蚓霪龈"}; 
const unsigned char PY_mb_ying[]= {"应影硬营英映迎樱婴鹰缨莹萤荧蝇赢盈颖嬴郢茔荥莺萦蓥撄嘤膺滢潆瀛瑛璎楹媵鹦瘿颍罂"}; 
const unsigned char PY_mb_yo[]=  {"育哟唷"}; 
const unsigned char PY_mb_yong[]=  {"用勇永拥涌蛹庸佣臃痈雍踊咏泳恿俑壅墉喁慵邕镛甬鳙饔"}; 
const unsigned char PY_mb_you[]=  {"有由又油右友优幼游尤诱犹幽悠忧邮铀酉佑釉卣攸侑莠莜莸尢呦囿宥柚猷牖铕疣蚰蚴蝣蝤繇鱿黝鼬"}; 
const unsigned char PY_mb_yu[]=  {"于与育鱼雨玉余遇预域语愈渔予羽愚御谷欲宇蔚尉迂淤盂榆虞舆俞逾愉渝隅娱屿禹芋郁吁喻峪狱誉浴寓裕豫驭粥禺毓伛俣谀谕萸菀蓣揄圄圉嵛狳饫馀庾阈鬻妪妤纡瑜昱觎腴腧欤於煜熨燠聿钰鹆鹬瘐瘀窬窳蜮蝓竽臾舁雩龉肀"}; 
const unsigned char PY_mb_yuan[]= {"员原圆源元远愿院缘援园怨鸳渊冤垣袁辕猿苑垸塬芫掾圜沅媛瑗橼爰眢鸢螈箢鼋"}; 
const unsigned char PY_mb_yue[]=  {"月说越约乐跃曰阅钥岳粤悦龠瀹栎樾刖钺"}; 
const unsigned char PY_mb_yun[]=  {"运员云匀均允孕耘郧陨蕴酝晕韵郓芸狁恽愠纭韫殒昀氲熨"}; 
const unsigned char PY_mb_z[]=   {"在这主中张章赵曾郑周邹朱种着祝甄庄宗詹臧祖左展争战作正之制重组治只子自质指"}; 
const unsigned char PY_mb_za[]=   {"杂扎咱匝砸咋咂"}; 
const unsigned char PY_mb_zai[]=   {"在再载栽灾仔哉宰崽甾"}; 
const unsigned char PY_mb_zan[]=   {"赞咱暂攒拶瓒昝簪糌趱錾"}; 
const unsigned char PY_mb_zang[]=  {"藏脏葬赃奘驵臧"}; 
const unsigned char PY_mb_zao[]= {"造早遭燥凿糟枣皂藻澡蚤躁噪灶唣"}; 
const unsigned char PY_mb_ze[]=  {"则择责侧泽咋仄赜啧帻迮昃笮箦舴"}; 
const unsigned char PY_mb_zei[]= {""}; 
const unsigned char PY_mb_zen[]=  {"怎谮"}; 
const unsigned char PY_mb_zeng[]=  {"增曾综憎赠缯甑罾锃"}; 
const unsigned char PY_mb_zh[]=  {"扎炸摘债战展长张章钟着照找这真争正政之制治只中周州主住抓转专撰赚装状准"}; 
const unsigned char PY_mb_zha[]=  {"查扎炸闸铡轧渣蜡喳札眨栅榨咋乍诈柞揸吒咤哳喋楂砟痄蚱齄"}; 
const unsigned char PY_mb_zhai[]=  {"寨侧择摘窄斋翟祭宅债砦瘵"}; 
const unsigned char PY_mb_zhan[]= {"战展站占粘颤瞻毡詹沾盏斩辗崭蘸栈湛绽谵搌旃"}; 
const unsigned char PY_mb_zhang[]={"长张章掌仗障胀涨账樟彰漳杖丈帐瘴仉鄣幛嶂獐嫜璋蟑"}; 
const unsigned char PY_mb_zhao[]=  {"着照找招朝召赵爪罩沼兆嘲昭肇诏啁棹钊笊"}; 
const unsigned char PY_mb_zhe[]=  {"这着者折哲浙遮蛰辙锗蔗谪摺柘辄磔鹧褶蜇赭"}; 
const unsigned char PY_mb_zhen[]=  {"真针阵镇振震珍诊斟甄砧臻贞侦枕疹圳蓁浈溱缜桢椹榛轸赈胗朕祯畛稹鸩箴"}; 
const unsigned char PY_mb_zheng[]= {"争正政整证征蒸症丁郑挣睁狰怔拯帧诤峥徵钲铮筝"}; 
const unsigned char PY_mb_zhi[]=   {"之制治只质指直支织止至置志值知识执职植纸致枝殖脂智氏肢秩址滞汁芝吱蜘侄趾旨挚掷帜峙稚炙痔窒卮陟郅埴芷摭帙徵忮彘咫骘栉枳栀桎轵轾贽胝膣祉祗黹雉鸷痣蛭絷酯跖踬踯豸觯"}; 
const unsigned char PY_mb_zhong[]= {"中种重众钟终忠肿仲盅衷冢忪锺螽舯踵"}; 
const unsigned char PY_mb_zhou[]=  {"轴周洲州皱骤舟诌粥肘帚咒宙昼荮啁妯纣绉胄碡籀繇酎"}; 
const unsigned char PY_mb_zhu[]=  {"主注著住助猪朱铸属株筑柱术驻逐祝竹贮珠诸蛛诛烛煮拄瞩嘱蛀伫侏邾茱洙渚潴杼槠橥炷铢疰瘃褚竺箸舳翥躅麈"}; 
const unsigned char PY_mb_zhua[]=  {"抓爪挝"}; 
const unsigned char PY_mb_zhuai[]= {"转曳拽嘬"}; 
const unsigned char PY_mb_zhuan[]= {"转专传砖撰赚篆啭馔沌颛"}; 
const unsigned char PY_mb_zhuang[]={"装状壮庄撞幢桩妆僮奘"}; 
const unsigned char PY_mb_zhui[]=  {"追锥椎赘坠缀惴骓缒"}; 
const unsigned char PY_mb_zhun[]=  {"准屯谆肫窀"}; 
const unsigned char PY_mb_zhuo[]=  {"着著捉桌缴拙卓琢茁酌啄灼浊倬诼擢浞涿濯棹焯禚斫镯"}; 
const unsigned char PY_mb_zi[]=  {"子自资字紫仔籽姿吱兹咨滋淄孜滓渍谘茈呲嵫姊孳缁梓辎赀恣眦锱秭耔笫粢趑觜訾龇鲻髭"}; 
const unsigned char PY_mb_zong[]=  {"总纵宗综棕鬃踪偬枞腙粽"}; 
const unsigned char PY_mb_zou[]=  {"走邹奏揍诹陬鄹驺鲰"}; 
const unsigned char PY_mb_zu[]=  {"组族足阻祖租卒诅俎菹镞"}; 
const unsigned char PY_mb_zuan[]=  {"钻赚纂攥缵躜"}; 
const unsigned char PY_mb_zui[]=  {"最罪嘴堆咀醉蕞"}; 
const unsigned char PY_mb_zun[]=  {"尊遵撙樽鳟"}; 
const unsigned char PY_mb_zuo[]=  {"作做左座坐昨撮凿搓琢佐柞阼唑嘬怍胙祚笮"}; 

     我们将这些组合称之为码表,然后将这些码表和其对应的数字串对应起来,组成一个拼音索引表,如下所示:     

  const py_index py_index3[]=
    {
    {"","",(u8*)PY_mb_space},

    {"2","a",(u8*)PY_mb_a},

           ……

  {"586","lun",(u8*)PY_mb_lun}, 

  {"586","luo",(u8*)PY_mb_luo}, 

  {"586","kun",(u8*)PY_mb_kun}, 

  {"586","kuo",(u8*)PY_mb_kuo}, 

            ……

   {"94664","zhong",(u8*)PY_mb_zhong},

   {"94824","zhuai",(u8*)PY_mb_zhuai},

   {"94826","zhuan",(u8*)PY_mb_zhuan},

    }

 

View Code
/*符号输入查询码表*/

/*英文输入查询码表*/
typedef struct
{
const char* key;
const char* Letter;
}T9EN_IDX;

const T9EN_IDX t9EN_index[] = {
{"2","abcABC"},
{"3","defDEF"},
{"4","ghiGHI"},
{"5","jklJKL"},
{"6","mnoMNO"},
{"7","pqrsPQRS"},
{"8","tuvTUV"},
{"9","wxyzWXYZ"}
};
/*拼音输入法查询码表*/
typedef struct 
{ 
const char *T9; 
const char *PY; 
const unsigned char *MB; 
}T9PY_IDX; 

const T9PY_IDX t9PY_index[] ={
{"2","a",PY_mb_a}, 
{"2","b",PY_mb_b},
{"2","c",PY_mb_c},
{"3","d",PY_mb_d}, 
{"3","e",PY_mb_e}, 
{"3","f",PY_mb_f}, 
{"4","g",PY_mb_g}, 
{"4","h",PY_mb_h},
{"5","j",PY_mb_j}, 
{"5","k",PY_mb_k}, 
{"5","l",PY_mb_l}, 
{"6","m",PY_mb_m}, 
{"6","n",PY_mb_n}, 
{"6","o",PY_mb_o}, 
{"7","p",PY_mb_p}, 
{"7","q",PY_mb_q}, 
{"7","r",PY_mb_r}, 
{"7","s",PY_mb_s}, 
{"8","t",PY_mb_t}, 
{"9","w",PY_mb_w},
{"9","x",PY_mb_x}, 
{"9","y",PY_mb_y}, 
{"9","z",PY_mb_z}, 
{"22","ba",PY_mb_ba},
{"22","ca",PY_mb_ca},
{"23","ce",PY_mb_ce},
{"23","be",PY_mb_bei},
{"24","ai",PY_mb_ai},
{"24","bi",PY_mb_bi},
{"24","ch",PY_mb_ch},
{"24","ci",PY_mb_ci}, 
{"26","co",PY_mb_cou},
{"26","bo",PY_mb_bo},
{"26","an",PY_mb_an},
{"26","ao",PY_mb_ao},
{"28","bu",PY_mb_bu},
{"28","cu",PY_mb_cu}, 
{"32","da",PY_mb_da}, 
{"32","fa",PY_mb_fa}, 
{"33","de",PY_mb_de}, 
{"33","fe",PY_mb_fei}, 
{"34","di",PY_mb_di}, 
{"34","ei",PY_mb_ei}, 
{"36","en",PY_mb_en}, 
{"36","fo",PY_mb_fo}, 
{"37","er",PY_mb_er}, 
{"36","do",PY_mb_dou}, 
{"38","du",PY_mb_du}, 
{"38","fu",PY_mb_fu}, 
{"42","ga",PY_mb_ga}, 
{"42","ha",PY_mb_ha}, 
{"43","ge",PY_mb_ge}, 
{"43","he",PY_mb_he}, 
{"46","go",PY_mb_gou}, 
{"46","ho",PY_mb_hou}, 
{"48","gu",PY_mb_gu}, 
{"48","hu",PY_mb_hu}, 
{"52","ka",PY_mb_ka}, 
{"52","la",PY_mb_la}, 
{"53","le",PY_mb_le}, 
{"53","ke",PY_mb_ke}, 
{"54","ji",PY_mb_ji}, 
{"54","li",PY_mb_li}, 
{"56","ko",PY_mb_kou}, 
{"56","lo",PY_mb_lo}, 
{"58","lu",PY_mb_lu}, 
{"58","lv",PY_mb_lv},
{"58","ju",PY_mb_ju}, 
{"58","ku",PY_mb_ku}, 
{"62","ma",PY_mb_ma}, 
{"62","na",PY_mb_na}, 
{"63","me",PY_mb_me}, 
{"63","ne",PY_mb_ne}, 
{"64","mi",PY_mb_mi}, 
{"64","ni",PY_mb_ni}, 
{"66","mo",PY_mb_mo},
{"66","no",PY_mb_nou}, 
{"68","mu",PY_mb_mu}, 
{"68","nu",PY_mb_nu}, 
{"68","nv",PY_mb_nv}, 
{"68","ou",PY_mb_ou}, 
{"72","pa",PY_mb_pa}, 
{"72","pe",PY_mb_pei}, 
{"72","ra",PY_mb_ran}, 
{"72","sa",PY_mb_sa}, 
{"73","re",PY_mb_re}, 
{"73","se",PY_mb_se}, 
{"74","pi",PY_mb_pi}, 
{"74","qi",PY_mb_qi}, 
{"74","ri",PY_mb_ri}, 
{"74","sh",PY_mb_sh}, 
{"74","si",PY_mb_si}, 
{"76","so",PY_mb_sou},
{"76","po",PY_mb_po}, 
{"76","ro",PY_mb_rou}, 
{"78","pu",PY_mb_pu}, 
{"78","qu",PY_mb_qu}, 
{"78","ru",PY_mb_ru}, 
{"78","su",PY_mb_su}, 
{"82","ta",PY_mb_ta}, 
{"83","te",PY_mb_te}, 
{"84","ti",PY_mb_ti}, 
{"86","to",PY_mb_tou}, 
{"88","tu",PY_mb_tu}, 
{"92","wa",PY_mb_wa}, 
{"92","ya",PY_mb_ya}, 
{"92","za",PY_mb_za}, 
{"93","ze",PY_mb_ze}, 
{"93","ye",PY_mb_ye}, 
{"94","yi",PY_mb_yi}, 
{"94","xi",PY_mb_xi}, 
{"94","zh",PY_mb_zh}, 
{"94","zi",PY_mb_zi}, 
{"96","zo",PY_mb_zou}, 
{"96","wo",PY_mb_wo}, 
{"96","yo",PY_mb_yo}, 
{"98","wu",PY_mb_wu}, 
{"98","xu",PY_mb_xu}, 
{"98","yu",PY_mb_yu}, 
{"98","zu",PY_mb_zu}, 
{"224","bai",PY_mb_bai},
{"224","cai",PY_mb_cai},
{"226","can",PY_mb_can},
{"226","cao",PY_mb_cao},
{"226","ban",PY_mb_ban},
{"226","bao",PY_mb_bao},
{"234","bei",PY_mb_bei},
{"236","ben",PY_mb_ben},
{"236","cen",PY_mb_cen},
{"242","bia",PY_mb_bian},
{"242","cha",PY_mb_cha},
{"243","che",PY_mb_che},
{"243","bie",PY_mb_bie},
{"244","chi",PY_mb_chi},
{"246","bin",PY_mb_bin},
{"246","cho",PY_mb_chou},
{"248","chu",PY_mb_chu},
{"264","ang",PY_mb_ang},
{"266","con",PY_mb_cong},
{"268","cou",PY_mb_cou}, 
{"282","cua",PY_mb_cuan}, 
{"284","cui",PY_mb_cui}, 
{"286","cun",PY_mb_cun}, 
{"286","cuo",PY_mb_cuo},
{"324","dai",PY_mb_dai}, 
{"326","dan",PY_mb_dan}, 
{"326","dao",PY_mb_dao}, 
{"326","fan",PY_mb_fan}, 
{"334","fei",PY_mb_fei}, 
{"336","fen",PY_mb_fen}, 
{"336","den",PY_mb_deng},
{"342","dia",PY_mb_dia}, 
{"343","die",PY_mb_die}, 
{"346","din",PY_mb_ding},
{"348","diu",PY_mb_diu}, 
{"366","don",PY_mb_dong}, 
{"368","dou",PY_mb_dou}, 
{"368","fou",PY_mb_fou}, 
{"382","dua",PY_mb_duan}, 
{"384","dui",PY_mb_dui}, 
{"386","dun",PY_mb_dun}, 
{"386","duo",PY_mb_duo}, 
{"424","gai",PY_mb_gai}, 
{"424","hai",PY_mb_hai}, 
{"426","han",PY_mb_han}, 
{"426","gan",PY_mb_gan}, 
{"426","gao",PY_mb_gao}, 
{"426","hao",PY_mb_hao}, 
{"434","hei",PY_mb_hei}, 
{"434","gei",PY_mb_gei}, 
{"436","gen",PY_mb_gen}, 
{"436","hen",PY_mb_hen}, 
{"466","gon",PY_mb_gong}, 
{"466","hon",PY_mb_hong}, 
{"468","gou",PY_mb_gou}, 
{"468","hou",PY_mb_hou}, 
{"482","hua",PY_mb_hua}, 
{"482","gua",PY_mb_gua}, 
{"484","gui",PY_mb_gui}, 
{"484","hui",PY_mb_hui}, 
{"486","hun",PY_mb_hun}, 
{"486","huo",PY_mb_huo}, 
{"486","gun",PY_mb_gun}, 
{"486","guo",PY_mb_guo}, 
{"524","kai",PY_mb_kai}, 
{"524","lai",PY_mb_lai}, 
{"526","lan",PY_mb_lan}, 
{"526","kan",PY_mb_kan}, 
{"526","kao",PY_mb_kao}, 
{"526","lao",PY_mb_lao}, 
{"534","lei",PY_mb_lei}, 
{"536","len",PY_mb_leng}, 
{"536","ken",PY_mb_ken}, 
{"542","jia",PY_mb_jia}, 
{"542","lia",PY_mb_lia}, 
{"543","jie",PY_mb_jie}, 
{"543","lie",PY_mb_lie}, 
{"546","lin",PY_mb_lin}, 
{"546","jin",PY_mb_jin}, 
{"546","jio",PY_mb_jiong}, 
{"548","jiu",PY_mb_jiu}, 
{"548","liu",PY_mb_liu}, 
{"566","lon",PY_mb_long}, 
{"566","kon",PY_mb_kong}, 
{"568","kou",PY_mb_kou}, 
{"568","lou",PY_mb_lou}, 
{"582","lua",PY_mb_luan}, 
{"582","kua",PY_mb_kua}, 
{"582","jua",PY_mb_juan}, 
{"583","jue",PY_mb_jue}, 
{"583","lue",PY_mb_lue}, 
{"584","kui",PY_mb_kui}, 
{"586","lun",PY_mb_lun}, 
{"586","luo",PY_mb_luo}, 
{"586","kun",PY_mb_kun}, 
{"586","kuo",PY_mb_kuo}, 
{"586","jun",PY_mb_jun}, 
{"624","mai",PY_mb_mai}, 
{"624","nai",PY_mb_nai}, 
{"626","nan",PY_mb_nan}, 
{"626","man",PY_mb_man}, 
{"626","mao",PY_mb_mao}, 
{"626","nao",PY_mb_nao}, 
{"634","nei",PY_mb_nei}, 
{"634","mei",PY_mb_mei}, 
{"636","nen",PY_mb_nen}, 
{"636","men",PY_mb_men}, 
{"642","mia",PY_mb_mian}, 
{"642","nia",PY_mb_nian}, 
{"643","mie",PY_mb_mie}, 
{"643","nie",PY_mb_nie}, 
{"646","nin",PY_mb_nin}, 
{"646","min",PY_mb_min}, 
{"648","miu",PY_mb_miu}, 
{"648","niu",PY_mb_niu}, 
{"666","non",PY_mb_nong}, 
{"668","mou",PY_mb_mou}, 
{"668","nou",PY_mb_nou}, 
{"682","nua",PY_mb_nuan}, 
{"683","nve",PY_mb_nve}, 
{"686","nuo",PY_mb_nuo}, 
{"724","pai",PY_mb_pai}, 
{"734","pei",PY_mb_pei}, 
{"724","sai",PY_mb_sai}, 
{"726","san",PY_mb_san}, 
{"726","pan",PY_mb_pan}, 
{"726","pao",PY_mb_pao}, 
{"736","pen",PY_mb_pen}, 
{"726","ran",PY_mb_ran}, 
{"726","rao",PY_mb_rao}, 
{"726","sao",PY_mb_sao},
{"736","sen",PY_mb_sen}, 
{"736","ren",PY_mb_ren}, 
{"742","pia",PY_mb_pian}, 
{"742","qia",PY_mb_qia}, 
{"742","sha",PY_mb_sha}, 
{"743","pie",PY_mb_pie}, 
{"743","qie",PY_mb_qie}, 
{"743","she",PY_mb_she}, 
{"744","shi",PY_mb_shi}, 
{"748","shu",PY_mb_shu}, 
{"746","qin",PY_mb_qin}, 
{"746","pin",PY_mb_pin}, 
{"746","qio",PY_mb_qiong}, 
{"746","sho",PY_mb_shou}, 
{"748","qiu",PY_mb_qiu}, 
{"766","ron",PY_mb_rong}, 
{"768","pou",PY_mb_pou}, 
{"768","rou",PY_mb_rou}, 
{"766","son",PY_mb_song},
{"768","sou",PY_mb_sou},
{"782","sua",PY_mb_suan}, 
{"782","rua",PY_mb_ruan}, 
{"782","qua",PY_mb_quan}, 
{"783","que",PY_mb_que}, 
{"784","rui",PY_mb_rui}, 
{"784","sui",PY_mb_sui}, 
{"786","sun",PY_mb_sun}, 
{"786","suo",PY_mb_suo}, 
{"786","run",PY_mb_run}, 
{"786","ruo",PY_mb_ruo}, 
{"786","qun",PY_mb_qun}, 
{"824","tai",PY_mb_tai}, 
{"826","tan",PY_mb_tan}, 
{"826","tao",PY_mb_tao}, 
{"836","ten",PY_mb_teng}, 
{"842","tia",PY_mb_tian}, 
{"843","tie",PY_mb_tie}, 
{"846","tin",PY_mb_ting}, 
{"866","ton",PY_mb_tong}, 
{"868","tou",PY_mb_tou}, 
{"882","tua",PY_mb_tuan}, 
{"884","tui",PY_mb_tui}, 
{"886","tun",PY_mb_tun}, 
{"886","tuo",PY_mb_tuo},
{"924","wai",PY_mb_wai}, 
{"924","zai",PY_mb_zai}, 
{"926","zan",PY_mb_zan}, 
{"926","wan",PY_mb_wan}, 
{"926","yan",PY_mb_yan}, 
{"926","yao",PY_mb_yao}, 
{"926","zao",PY_mb_zao}, 
{"934","zei",PY_mb_zei}, 
{"934","wei",PY_mb_wei}, 
{"936","zen",PY_mb_zen}, 
{"936","wen",PY_mb_wen}, 
{"942","xia",PY_mb_xia}, 
{"942","zha",PY_mb_zha}, 
{"943","xie",PY_mb_xie}, 
{"943","zhe",PY_mb_zhe}, 
{"944","zhi",PY_mb_zhi}, 
{"946","zho",PY_mb_zhou}, 
{"946","xin",PY_mb_xin}, 
{"946","xio",PY_mb_xiong}, 
{"946","yin",PY_mb_yin}, 
{"948","xiu",PY_mb_xiu}, 
{"948","zhu",PY_mb_zhu}, 
{"966","yon",PY_mb_yong}, 
{"966","zon",PY_mb_zong}, 
{"968","you",PY_mb_you}, 
{"968","zou",PY_mb_zou}, 
{"982","zua",PY_mb_zuan}, 
{"982","yua",PY_mb_yuan}, 
{"982","xua",PY_mb_xuan}, 
{"983","xue",PY_mb_xue}, 
{"983","yue",PY_mb_yue}, 
{"984","zui",PY_mb_zui}, 
{"986","zun",PY_mb_zun}, 
{"986","zuo",PY_mb_zuo}, 
{"986","yun",PY_mb_yun}, 
{"986","xun",PY_mb_xun}, 
{"2264","bang",PY_mb_bang},
{"2364","beng",PY_mb_beng},
{"2426","bian",PY_mb_bian},
{"2426","biao",PY_mb_biao},
{"2464","bing",PY_mb_bing},
{"2264","cang",PY_mb_cang},
{"2364","ceng",PY_mb_ceng},
{"2424","chai",PY_mb_chai},
{"2426","chan",PY_mb_chan},
{"2426","chao",PY_mb_chao},
{"2436","chen",PY_mb_chen},
{"2466","chon",PY_mb_chong},
{"2468","chou",PY_mb_chou},
{"2482","chua",PY_mb_chuai},
{"2484","chui",PY_mb_chui},
{"2486","chun",PY_mb_chun},
{"2486","chuo",PY_mb_chuo},
{"2664","cong",PY_mb_cong},
{"2826","cuan",PY_mb_cuan},
{"3264","dang",PY_mb_dang}, 
{"3264","fang",PY_mb_fang}, 
{"3364","feng",PY_mb_feng}, 
{"3364","deng",PY_mb_deng}, 
{"3426","dian",PY_mb_dian}, 
{"3426","diao",PY_mb_diao}, 
{"3464","ding",PY_mb_ding}, 
{"3664","dong",PY_mb_dong}, 
{"3826","duan",PY_mb_duan}, 
{"4264","gang",PY_mb_gang}, 
{"4364","geng",PY_mb_geng}, 
{"4664","gong",PY_mb_gong}, 
{"4824","guai",PY_mb_guai}, 
{"4826","guan",PY_mb_guan}, 
{"4264","hang",PY_mb_hang}, 
{"4364","heng",PY_mb_heng}, 
{"4664","hong",PY_mb_hong}, 
{"4824","huai",PY_mb_huai}, 
{"4826","huan",PY_mb_huan},
{"5264","kang",PY_mb_kang}, 
{"5264","lang",PY_mb_lang}, 
{"5364","leng",PY_mb_leng}, 
{"5364","keng",PY_mb_keng}, 
{"5426","lian",PY_mb_lian}, 
{"5426","liao",PY_mb_liao}, 
{"5426","jian",PY_mb_jian}, 
{"5426","jiao",PY_mb_jiao}, 
{"5464","jing",PY_mb_jing}, 
{"5464","ling",PY_mb_ling}, 
{"5466","jion",PY_mb_jiong}, 
{"5664","long",PY_mb_long}, 
{"5664","kong",PY_mb_kong}, 
{"5824","kuai",PY_mb_kuai}, 
{"5826","kuan",PY_mb_kuan}, 
{"5826","luan",PY_mb_luan}, 
{"5826","juan",PY_mb_juan}, 
{"6264","mang",PY_mb_mang}, 
{"6264","nang",PY_mb_nang}, 
{"6364","meng",PY_mb_meng}, 
{"6364","neng",PY_mb_neng}, 
{"6426","mian",PY_mb_mian}, 
{"6426","miao",PY_mb_miao}, 
{"6426","nian",PY_mb_nian}, 
{"6426","niao",PY_mb_niao}, 
{"6464","ming",PY_mb_ming}, 
{"6464","ning",PY_mb_ning}, 
{"6664","nong",PY_mb_nong}, 
{"6826","nuan",PY_mb_nuan}, 
{"7264","pang",PY_mb_pang}, 
{"7364","peng",PY_mb_peng}, 
{"7264","rang",PY_mb_rang}, 
{"7264","sang",PY_mb_sang}, 
{"7364","seng",PY_mb_seng}, 
{"7364","reng",PY_mb_reng}, 
{"7424","shai",PY_mb_shai}, 
{"7426","shan",PY_mb_shan}, 
{"7426","shao",PY_mb_shao}, 
{"7426","pian",PY_mb_pian}, 
{"7426","piao",PY_mb_piao}, 
{"7426","qian",PY_mb_qian}, 
{"7426","qiao",PY_mb_qiao}, 
{"7436","shen",PY_mb_shen}, 
{"7464","ping",PY_mb_ping}, 
{"7464","qing",PY_mb_qing}, 
{"7466","qion",PY_mb_qiong}, 
{"7468","shou",PY_mb_shou}, 
{"7482","shua",PY_mb_shua}, 
{"7484","shui",PY_mb_shui}, 
{"7486","shun",PY_mb_shun}, 
{"7486","shuo",PY_mb_shuo}, 
{"7664","rong",PY_mb_rong}, 
{"7664","song",PY_mb_song},
{"7826","suan",PY_mb_suan}, 
{"7826","quan",PY_mb_quan}, 
{"7826","ruan",PY_mb_ruan}, 
{"8264","tang",PY_mb_tang}, 
{"8364","teng",PY_mb_teng}, 
{"8426","tian",PY_mb_tian}, 
{"8426","tiao",PY_mb_tiao}, 
{"8464","ting",PY_mb_ting}, 
{"8664","tong",PY_mb_tong}, 
{"8826","tuan",PY_mb_tuan}, 
{"9264","wang",PY_mb_wang}, 
{"9264","zang",PY_mb_zang}, 
{"9264","yang",PY_mb_yang}, 
{"9364","weng",PY_mb_weng}, 
{"9364","zeng",PY_mb_zeng}, 
{"9424","zhai",PY_mb_zhai}, 
{"9426","zhan",PY_mb_zhan}, 
{"9426","zhao",PY_mb_zhao}, 
{"9426","xian",PY_mb_xian}, 
{"9426","xiao",PY_mb_xiao}, 
{"9436","zhen",PY_mb_zhen}, 
{"9464","xing",PY_mb_xing}, 
{"9464","ying",PY_mb_ying}, 
{"9466","zhon",PY_mb_zhong}, 
{"9468","zhou",PY_mb_zhou}, 
{"9482","zhua",PY_mb_zhua}, 
{"9484","zhui",PY_mb_zhui}, 
{"9486","zhun",PY_mb_zhun}, 
{"9486","zhuo",PY_mb_zhuo}, 
{"9466","xion",PY_mb_xiong}, 
{"9664","yong",PY_mb_yong}, 
{"9664","zong",PY_mb_zong}, 
{"9826","yuan",PY_mb_yuan}, 
{"9826","xuan",PY_mb_xuan}, 
{"9826","zuan",PY_mb_zuan}, 
{"94264","xiang",PY_mb_xiang}, 
{"94264","zhang",PY_mb_zhang}, 
{"94364","zheng",PY_mb_zheng}, 
{"94664","xiong",PY_mb_xiong}, 
{"94664","zhong",PY_mb_zhong}, 
{"94824","zhuai",PY_mb_zhuai}, 
{"94826","zhuan",PY_mb_zhuan},
{"24264","chang",PY_mb_chang},
{"24364","cheng",PY_mb_cheng},
{"24664","chong",PY_mb_chong},
{"24824","chuai",PY_mb_chuai},
{"24826","chuan",PY_mb_chuan},
{"48264","guang",PY_mb_guang}, 
{"48264","huang",PY_mb_huang}, 
{"54264","jiang",PY_mb_jiang}, 
{"54264","liang",PY_mb_liang}, 
{"54664","jiong",PY_mb_jiong}, 
{"58264","kuang",PY_mb_kuang}, 
{"64264","niang",PY_mb_niang}, 
{"74264","qiang",PY_mb_qiang}, 
{"74264","shang",PY_mb_shang}, 
{"74364","sheng",PY_mb_sheng}, 
{"74664","qiong",PY_mb_qiong}, 
{"74824","shuai",PY_mb_shuai}, 
{"74826","shuan",PY_mb_shuan}, 
{"248264","chuang",PY_mb_chuang},
{"748264","shuang",PY_mb_shuang}, 
{"948264","zhuang",PY_mb_zhuang}, 
{"","",PY_mb_space} 

};

 其中py_index 是一个结构体,定义如下:

  typedef struct
     {
          u8 *py_input; //输入的字符串

          u8 *py;      //对应的拼音

         u8 *pymb;    //码表

      }py_index;

  py_input是与拼音对应的数字串,比如“94824 ”。py是与py_input 数字串对应的拼音,如果py_input=" 94824 ”,那么py 就是“zhuai ”。最后pymb,就是我们前面说到的码表。注意,一个数字串可以对应多个拼音,也可以对应多个码表。

     在有了这个拼音索引表(py_index3)之后,我们只需要将输入的数字串和py_index3 索引 表里面所有成员的py_input 对比,将所有完全匹配的情况记录下来(例如记录在py_index**matchlist中),然后由用户选择可能的拼音组成(假设有多个匹配的项目),再选择对应的汉字,即完成一次汉字输入。当然还可能是找遍了索引表,也没有发现一个完全符合要求的成员,那么我们会统计匹配数最多的情况,作为最佳结果,反馈给用户。比如,用户输入“323”,找不到完全匹配的情况,那么我们就将能和“32”匹配的结果返回给用户。这样,用户还是可以得到输入结果,同时还可以知道输入有问题,提示用户需要检查输入是否正确。

   一个完整的T9 拼音输入步骤(过程):

    1)输入拼音数字串

         我们用到的T9 拼音输入法的核心思想就是对比用户输入的拼音数字串,所以必   须先由用户输入拼音数字串。

    2 )在拼音索引表里面查找和输入字符串匹配的项,并记录

       在得到用户输入的拼音数字串之后,在拼音索引表里面查找所有匹配的项目,如果有 完全匹配的项目,就全部记录下来,如果没有完全匹配的项目,则记录匹配情况最好的一个项目。

    3 )显示匹配清单里面所有可能的汉字,供用户选择.

       将匹配项目的拼音和对应的汉字显示出来,供用户选择。如果有多个匹配项(一个数字串对应多个拼音的情况),则用户还可以选择拼音。

    4 )用户选择匹配项,并选择对应的汉字.

       用户对匹配的拼音和汉字进行选择,选中其真正想输入的拼音和汉字,实现一次拼音输入。

    以上4 个步骤,就可以实现一个简单的T9 汉字拼音输入法。  

View Code
// 比较两个字符串的匹配情况 
 //返回值:0xff,表示完全匹配. 
//        其他,匹配的字符数 
   u8 str_match(u8*str1,u8*str2) 

   { 
       u8 i=0; 
       while(1) 
        { 
            if(*str1!=*str2)break;        //部分匹配 
            if(*str1==\'\0\'){i=0XFF;break;}//完全匹配 
            i++; str1++; str2++; 
        } 
       return i;//两个字符串相等 
   } 
   //获取匹配的拼音码表 
   //*strin,输入的字符串,形如:"726" 
   //**matchlist,输出的匹配表. 
   //返回值:[7],0,表示完全匹配;1,表示部分匹配(仅在没有完全匹配的时候才会出现) 
   // [6:0],完全匹配的时候,表示完全匹配的拼音个数 
   //            部分匹配的时候,表示有效匹配的位数 
   u8 get_matched_pymb(u8 *strin,py_index **matchlist) 
   { 
       py_index *bestmatch;//最佳匹配 
       u16 pyindex_len; u16 i; 
       u8 temp,mcnt=0,bmcnt=0; 
       bestmatch=(py_index*)&py_index3[0];//默认为a 的匹配 
       pyindex_len=sizeof(py_index3)/sizeof(py_index3[0]);//得到py 索引表的大小. 
       for(i=0;i<pyindex_len;i++) 
        { 
            temp=str_match(strin,(u8*)py_index3[i].py_input); 
            if(temp) 
            { 
                 if(temp==0XFF)matchlist[mcnt++]=(py_index*)&py_index3[i]; 
                 else if(temp>bmcnt)//找最佳匹配 
                 { 
                     bmcnt=temp; 
                     bestmatch=(py_index*)&py_index3[i];//最好的匹配. 
                 } 
            } 
        } 
       if(mcnt==0&&bmcnt)//没有完全匹配的结果,但是有部分匹配的结果 
        { 
            matchlist[0]=bestmatch; 
            mcnt=bmcnt|0X80;       //返回部分匹配的有效位数 
} 
        return mcnt;//返回匹配的个数 
    } 
    //得到拼音码表. 
    //str:输入字符串 
    //返回值:匹配个数. 
    u8 get_pymb(u8* str) 
    { 
        return get_matched_pymb(str,t9.pymb); 
    } 
    // 测试用 
    void test_py(u8 *inputstr) 
    { 
         ……代码省略 
    }