paip.输入法编程--英文ati化By音标原理与中文atiEn处理流程 python 代码为例
2014-04-28 00:12
573 查看
paip.输入法编程--英文ati化By音标原理与中文atiEn处理流程 python 代码为例
#---目标
1. en vs enPHati
2.en vs enPhAtiSmp
3.cn vs enPHati
4. cn vs enPhAtiSmp
#两个方法,一个获得enPhAtied代码,一个获得哪的smp版本..
def convert2atiEnPnNoSpltr(old):
a=old.replace("@", "").replace("-", "")
return a
def Smp(old):
"""odl=@n-@y-u@t-@rw-@t-
"""
old=trim(old,"@")
r=""
a=old.split("@")
for val in a:
a2=val.split("-")
csnt=a2[0]
r=r+csnt
#endfor
old=trim(old,"-")
if(isStartWithVowel(old)):
startx=old[0]
r=startx+r
if(len(trim(old))<=3) :
return old
return r
作者 老哇的爪子 Attilax 艾龙, EMAIL:1466519819@qq.com
转载请注明来源: http://blog.csdn.net/attilax
#---导出为输入法词库格式.
en vs atiEnPh and atiENPHsmp
SELECT encn.en,atiNoSpltr FROM `grejx_def` encn
left JOIN `enphonetic` enph
on enph.en=encn.en
where atiNoSpltr is not null and encn.en is not null
SELECT encn.en,atismp FROM `grejx_def` encn
left JOIN `enphonetic` enph
on enph.en=encn.en
where atismp is not null and encn.en is not null
#-- cn vs atiEnPh and smp
SELECT clrbrkt, atiNoSpltr FROM `grejx_def` encn
left JOIN `enphonetic` enph
on enph.en=encn.en
where atiNoSpltr is not null and clrbrkt is not null
SELECT encn.en, clrbrkt,atiNoSpltr,atismp,enph.id FROM `grejx_def` encn
left JOIN `enphonetic` enph
on enph.en=encn.en
where atismp is not null and LENGTH(atiNoSpltr)<=4
#---目标
1. en vs enPHati
2.en vs enPhAtiSmp
3.cn vs enPHati
4. cn vs enPhAtiSmp
#两个方法,一个获得enPhAtied代码,一个获得哪的smp版本..
def convert2atiEnPnNoSpltr(old):
a=old.replace("@", "").replace("-", "")
return a
def Smp(old):
"""odl=@n-@y-u@t-@rw-@t-
"""
old=trim(old,"@")
r=""
a=old.split("@")
for val in a:
a2=val.split("-")
csnt=a2[0]
r=r+csnt
#endfor
old=trim(old,"-")
if(isStartWithVowel(old)):
startx=old[0]
r=startx+r
if(len(trim(old))<=3) :
return old
return r
作者 老哇的爪子 Attilax 艾龙, EMAIL:1466519819@qq.com
转载请注明来源: http://blog.csdn.net/attilax
#---导出为输入法词库格式.
en vs atiEnPh and atiENPHsmp
SELECT encn.en,atiNoSpltr FROM `grejx_def` encn
left JOIN `enphonetic` enph
on enph.en=encn.en
where atiNoSpltr is not null and encn.en is not null
SELECT encn.en,atismp FROM `grejx_def` encn
left JOIN `enphonetic` enph
on enph.en=encn.en
where atismp is not null and encn.en is not null
#-- cn vs atiEnPh and smp
SELECT clrbrkt, atiNoSpltr FROM `grejx_def` encn
left JOIN `enphonetic` enph
on enph.en=encn.en
where atiNoSpltr is not null and clrbrkt is not null
SELECT encn.en, clrbrkt,atiNoSpltr,atismp,enph.id FROM `grejx_def` encn
left JOIN `enphonetic` enph
on enph.en=encn.en
where atismp is not null and LENGTH(atiNoSpltr)<=4
相关文章推荐
- paip.输入法编程--英文ati化By音标原理与中文atiEn处理流程 python 代码为例
- paip.输入法编程--英文ati化By音标原理与中文atiEn处理流程 python 代码为例
- paip.输入法英文词库的处理 python 代码 o4
- paip.输入法英文词库的处理 python 代码 o4
- Gensim初步使用和详细解释(该代码只能处理英文,处理中文不可用该代码)
- paip.输入法编程---词库多意义条目分割 python实现.
- paip.输入法编程---词库多意义条目分割 python实现.
- Python第二篇【if语句、while循环、for循环、代码注释、中文乱码处理】
- paip.日志中文编码原理问题本质解决python
- paip.日志中文编码原理问题本质解决python
- python2.7.x的字符串编码到底什么鬼?(中文和英文的处理)
- python 中文字符串的处理实现代码
- 7.10 Ubuntu 英文界面下处理中文输入法
- paip.导入数据英文音标到数据库mysql为空的问题之道解决原理
- paip.导入数据英文音标到数据库mysql为空的问题之道解决原理
- python 中文字符串的处理实现代码
- Tensorflow反卷积(DeConv)实现原理+手写python代码实现反卷积(DeConv)
- Python机器学习-感知机原理及代码实现
- python编程开发之textwrap文本样式处理技巧