rime五笔词库合并
2 minute read
0x01 Step1:on kali linux
/usr/bin/rime_dic_manager -l
output:wubi86
cd /root/桌面/
/usr/bin/rime_dic_manager -e wubi86 kali.txt
0x02 Step2:on win7
cd %appdata%\rime
copy wubi86.userdb.kct \\kali\桌面\
0x03 Step3:on kali linux
cd /root/.config/fcitx/rime
mv /root/.config/fcitx/rime/wubi86.userdb.kct wubi86.userdb.kct.bak
cp /root/桌面/wubi86.userdb.kct .
重新布置rime
/usr/bin/rime_dic_manager -l
cd /root/桌面
/usr/bin/rime_dic_manager -e wubi86 win7.txt
-------------------two ways since now---------------
first:
/usr/bin/rime_dic_manager -i wubi86 kali.txt
重新布置rime
second:
vi -d kali.txt win7.txt
vi kali.txt
G
o
esc
:r win7.txt
:x
python 字典去重.py kali.txt (output:outfile.txt)
this .py script:https://raw.githubusercontent.com/3xp10it/password_tools/master/%E5%AD%97%E5%85%B8%E6%95%B4%E7%90%86%E5%8E%BB%E9%87%8D%E5%B7%A5%E5%85%B7/%E5%AD%97%E5%85%B8%E6%95%B4%E7%90%86%E5%8E%BB%E9%87%8D%E5%B7%A5%E5%85%B7.py
/usr/bin/rime_dict_manager -r outfile.txt
or
/usr/bin/rime_dict_manager -i wubi86 outfile.txt
重新布置rime
---------------------end----------------------------
update
16-05-25
win7:
程序->用户词库管理->导出词典快照(rime->rime)
->导出文本码表(dic->newdic)
the difference between 词典快照 and 文本码表
1.词典快照
2.文本码表
16-05-28
python script:(performs well on kali,but not on win7)
download:
https://raw.githubusercontent.com/3xp10it/mytools/master/rimedic_handle.py
---------rimedic_handle.py------------
import sys
fp=open(sys.argv[1])
all=fp.readlines()
fp.close()
#print len(all)
newall2in3=[]
fp=open("newdic.txt","a+")
for eachline in all:
if "#" not in eachline:
eachline2in3=eachline.split('\t')[:2]
if eachline2in3 not in newall2in3 and 'enc' not in eachline and ' ' not in eachline2in3[0] and (eachline2in3[0][0]<'a' or eachline2in3[0][0]>'z'):
newall2in3.append(eachline2in3)
fp.write(eachline)
#print len(newall)
fp.close()
--------------------------------------
get pure txt dic
different from real rime dic,this pure txt dic does not exist the rime dic header like
# rime-...
# user-id...
but this pure txt dic has the same \t split symbol as real rime dic
dic from win7:
导出文本码表
cp out.txt \\kali\root\out.txt
cd \\kali\root
python rimedic_handle.py out.txt
output:newdic.txt
dic from kali:
cd /root/.config/fcxti/rime
pkill fcitx
/usr/bin/rime_dict_manager -e wubi86 /root/kali.txt
cd /root
python rimedic_handle.py kali.txt
output:newdic.txt
restart fcitx:
https://www.findspace.name/res/786
-----------content------------
pidof fcitx | xargs kill
pidof sogou-qimpanel | xargs kill
nohup fcitx 1>/dev/null 2>/dev/null &
nohup sogou-qimpanel 1>/dev/null 2>/dev/null &
-----------end----------------
or:
--------content---------
pidof fcitx | xargs kill;pidof sogou-qimpanel | xargs kill;nohup fcitx 1>/dev/null 2>/dev/null &;nohup sogou-qimpanel 1>/dev/null 2>/dev/null &
---------end------------
make myown larger dic
download 8万精准超小词库.txt from
https://github.com/studyzy/imewlconverter/tree/master/IME%20WL%20Converter/%E5%8F%82%E8%80%83
download scel from sougou wubi website
https://wubi.sogou.com/dict/
use imewlconverter.exe(深蓝词库转换工具) to convert from upon dics.txt to 8w_sougou_rime_wubi86_dic.txt
*attention*:
do not forget to change frequency from 10 to 1 when turning sougou scel to rime dic,the number of frequency words from sougou scel may not be 1,but bigger like 10.
cd \\kali\root
vi 8w_sougou_rime_wubi86_dic.txt
G
:r newdic.txt
XX
rm newdic.txt
python rimedic_handle.py 8w_sougou_rime_wubi86_dic.txt
output:newdic.txt
16-05-28 newdic.txt's download link:
8w only:
https://pan.baidu.com/s/1c2uiZks
8w+scel_sougou_new_added_frequency_to_1:
https://pan.baidu.com/s/1miMsYhU
import:
kali:
cd /root/.config/fcitx/rime
/usr/bin/rime_dict_manager -i wubi86 /root/newdic.txt
win7:
导入文本码表---->\\kali\root\newdic.txt