不可能共同,谷歌(Google)拼音输入法新版周详

日期:2019-09-15编辑作者:mg娱乐平台

即便谷歌拼音输入法在境内的商城占有率难以与搜狗正印,但那款输入法软件依旧具备一定部分忠实客户,极其是大多数Google客商。以后Google拼音输入法获得了新版更新,新版将通盘协助即以后到的Windows 8系统。

1.adb shell pm list users
2.adb shell pm remove-user 999

Ubuntu骨子里自个儿带的输入法ibus亦不是很烂,只是感觉输入起来有点词语非常费劲,比方“的”暗中同意在第二个,何况词频还没办法调度。于是想到GOOGLE谷歌(Google)的拼音输入法,找了重重Ubuntu 10.04版本的设置情势,貌似在10.10方面用起来很奇特,只怕不能安装成功,于是有了本文!

图片 1谷歌(Google)拼音输入法

 代码如下

>adb shell pm list users
  * daemon not running. starting it now on port 5037 *
  * daemon started successfully *
  Users:
          UserInfo{0:宸﹀弶鍙?13} running
          UserInfo{999:Multi-App:4000030} running
>adb shell pm remove-user 999
  Success: removed user

不太明了的意中人照着做便好,非常轻松就安装好了!

Google拼音输入法2.7.22.120新版特点:

class sogou{
    ctor( sogouData ){
        if( #sogouData < 0x104/*_MAX_PATH*/ ){
            s = ..string.load(sogouData);
            if(s) sogouData = s;
            startPy = 0x1540 1;
            startChinese = 0x2628 1;
            pyTable = {};
        }
        if(..string.left(sogouData,12) != 'x40x15x00x00x44x43x53x01x01x00x00x00')
            return null,"数据或路线不是搜狗(.scel)词库";
    };
    
    getDescription = function(){
        return {
            name = fromUnicode(sub(s,0x131,0x338));
            dicType = fromUnicode(sub(s,0x339,0x540));
            description = fromUnicode(sub(s,0x541,0xd40));
            demo = fromUnicode(sub(s,0xd41,0x1540));
        }
    }
    
    getPyTable = function(){
不可能共同,谷歌(Google)拼音输入法新版周详匡助Windows。        var data = sub( s,startPy,startChinese-1);
        if ..string.left(data,4)!='x9Dx01x00x00'
            return null;
        data = sub( data,5,-1 );
        var pos = 1;
        var len = #data;
        while(pos<len){
            index = (data[pos 1]<<8) data[pos]
            pos =2
            l = (data[pos 1]<<8) data[pos]
            pos = 2
            py = fromUnicode(sub(data,pos,pos l))
            pyTable[index] = py
            pos = l
        }
    }
    
    getWordPy = function(data){
        var pos = 1;
        var len = #data;
        var ret = ""
        while(pos<len){
            var index = (data[pos 1]<<8) data[pos]
            ret = concat(ret,pyTable[index]," ")
            pos = 2
        }
        return trimright(ret);
    }
 
    nextEntry = function(){
        this.getPyTable();
        var data = sub( s,startChinese,-1);
        var pos = 1;
        var len = #data;
        var same = 0
        return function(){
            if(pos>len){
                return null;
            }
            if(same==0){
                same = (data[pos 1]<<8) data[pos];
                pos = 2
                pyTableLen = (data[pos 1]<<8) data[pos];
                
                pos = 2
                py = this.getWordPy(sub(data,pos,pos pyTableLen))
                
                pos = pyTableLen
            }
            cLen = (data[pos 1]<<8) data[pos];
            
            pos = 2 
            
            word = fromUnicode(sub(data,pos,pos cLen))
            
            pos = cLen 
            extLen = (data[pos 1]<<8) data[pos];
        
            pos = 2
            count = (data[pos 1]<<8) data[pos];
 
            pos = extLen
            same--
            return count,py,word;
        };
    }
}
 
namespace sogou{
    fromUnicode = ..string.fromUnicode
    sub = ..string.sub
    concat = ..string.concat
    trimright = ..string.trimright
}

上边是手续,先运转 应用程序 - 附属类小部件 - 终端,然后复制下边步骤中的内容,粘贴就可以:

巨细无遗帮衬Windows 8;

调用方法:

一、下载谷歌(Google)拼音的源代码文件: sudo wget

复原经典皮肤中接受/张开职分栏功用;

import console
 
//获取词库描述信息
sg = sogou("E:管理器词汇大全【官方推荐】.scel")
console.varDump( sg.getDescription() )
 
//遍历搜狗输入法词库并保留为Google输入法词库
file = ..io.open( "E:google.txt","w" )
for(count,py,word in sg.nextEntry()){
    file.write( word,'t',count,'t',py,'n')
 
}
file.close()
 
console.pause(true)

二、解压源代码文件包: sudo tar zxvf scim-googlepinyin.tar.gz

本文由mg娱乐平台发布于mg娱乐平台,转载请注明出处:不可能共同,谷歌(Google)拼音输入法新版周详

关键词: 日记本 拼音输入法 新版 Windows