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

paip.输入法编程--英文ati化By音标原理与中文atiEn处理流程 python 代码为例的更多相关文章

  1. paip.输入法编程---词库多意义条目分割 python实现.

    paip.输入法编程---词库多意义条目分割 python实现. ==========子标题 python mysql 数据库操作 多字符分隔,字符串分割 字符列表循环  作者 老哇的爪子 Attil ...

  2. paip.输入法编程---词频顺序order by py

    paip.输入法编程---词频顺序order by py 作者Attilax ,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:http://blog.csdn ...

  3. paip.输入法编程----删除双字词简拼

    paip.输入法编程----删除双字词简拼 作者Attilax ,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:http://blog.csdn.net/at ...

  4. paip.输入法编程---带ord gudin去重复-

    paip.输入法编程---带ord gudin去重复- 作者Attilax ,  EMAIL:1466519819@qq.com 来源:attilax的专栏 地址:http://blog.csdn.n ...

  5. paip.输入法编程---增加码表类型

    paip.输入法编程---增加码表类型 作者Attilax ,  EMAIL:1466519819@qq.com 来源:attilax的专栏 地址:http://blog.csdn.net/attil ...

  6. paip输入法编程之生活用高频字,以及汉字分级

    paip输入法编程之生活用高频字 作者Attilax ,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:http://blog.csdn.net/attilax ...

  7. paip.输入法编程----一级汉字1000个

    paip.输入法编程----一级汉字1000个.txt 作者Attilax ,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:http://blog.csdn. ...

  8. paip.输入法编程---智能动态上屏码儿长调整--.txt

    paip.输入法编程---智能动态上屏码儿长调整--.txt 作者Attilax ,  EMAIL:1466519819@qq.com 来源:attilax的专栏 地址:http://blog.csd ...

  9. paip.输入法编程---输入法ATIaN历史记录 c823

    paip.输入法编程---输入法ATIaN历史记录 c823 作者Attilax ,  EMAIL:1466519819@qq.com 来源:attilax的专栏 地址:http://blog.csd ...

随机推荐

  1. zabbix快速安装

    运维什么的其实感觉根本没有什么好写的了,因为太简单了嘛,尤其是这个监控,整得那么麻烦要干嘛,不过貌似很多人喜欢这个,我就随手写一点吧 环境:centos7.2.1511最简安装,就是什么都不选直接就开 ...

  2. Quartus中添加时序约束

    1.sdc文件也是要添加到Quartus 软件中,这样在执行Read SDC File命令时才能读到相应的文件. 2.在TimeQuest打开的条件下,重新编译工程之后要Update Timing N ...

  3. winform-全局异常捕获作用

    using System;using System.Collections.Generic;using System.Linq;using System.Windows.Forms;using Jxs ...

  4. Light OJ 1026 - Critical Links (图论-双向图tarjan求割边,桥)

    题目大意:双向联通图, 现在求减少任意一边使图的联通性改变,按照起点从小到大列出所有这样的边 解题思路:双向边模版题 tarjan算法 代码如下: #include<bits/stdc++.h& ...

  5. SDK,monkey 浅谈

    最近在工作之余碰到一些手机测试的新手,现在测试手机的基本都是android的系统. 然后在遇到压力测试的时候就开始遇到问题了. 压力测试用什么工具?怎么使用?工具怎么来? 今天遇到两个人都问我SDK是 ...

  6. 移动端布局,div按比例布局,宽度为百分比,高度和宽度一样,即让div为正方形

    http://codepen.io/airen/details/XbVBZo <div><span>1</span></div> <div> ...

  7. 解决: Can’t connect to local MySQL server through socket /var/lib/mysql/mysql.sock

    今天在搬瓦工上使用mysql 命令行,总报一个这样的错:Can't connect to local MySQL server through socket '/xxxxx/mysql.sock',一 ...

  8. iOS AFNetworking “Request failed: unacceptable content-type: text/html”问题

    使用AFNetworking出现报错: error=Error Domain=com.alamofire.error.serialization.response Code=-1016 "R ...

  9. 插件兼容CommonJS, AMD, CMD 和 原生 JS

    模块标准 CommonJS CommonJS 有三个全局变量 module.exports 和 require.但是由于 AMD 也有 require 这个全局变量,故不使用这个变量来进行检测. 如果 ...

  10. PoEdu - C++阶段班- Lesson07 To Lesson10_C to C++

    07  重载导致的二义性 问题:为什么一定要重载呢?重载能方便我们注重函数的功能,当参数类型不确定时,我们能很便捷的利用重载的机制达到目的. 重载注意点:二义性 看代码: #include <c ...