Currently, there’re varieties of chinese input methods on Linux system. Pinyin, sunpinyin googlepinyin and etc, without chinese dicts. All of them work but not meet chinese input style, although sogou input has issued a linux version with user dict years before. Sogou’s dict works amazingly, but not with my emacs. So I am about to use pinyin, sunpinyin with sougo’s dict under fcitx.
methods | good | bad |
---|---|---|
sunpinyin+userdict | simple, easy | large dict |
pinyin+dicts | simple | large dict |
pinyin+dicts(selected) | needs converting | complicated |
download sunpinyin-userdict.7z
from here
extrated the package and move it to ~/.sunpinyin/
reboot and sign in.
The dicts download from here can not use directly, you need a tool named createPYMB to convert it to .mb type, you can install createPYMB by apt or download it.
download address
install command
sudo apt install fcitx-tools
download dicts from herefcitx-sougou-phrase-full
convert it to .mb type.
with createPYMB
./createPYMB gbkpy.org pyPhrase.org
with fcitx-tools
cd ~/Downloads/fcitx-sougou-phrase-full
createPYMB gbkpy.org pyPhrase.org
3.wait several minutes until done, then move
pybase.mb
pyphrase.mb
pyPhrase.org
to
/usr/share/fcitx/data
or
/usr/share/fcitx/pinyin
4.reboot and sign in.
download **.scel you need from sougou official website
convert .scel to .org with scel2org (included in fcitx-tools)
code
mkdir -p tmp && cd tmp && mkdir -p orgfile
mv ~/Downloads/*.scel ./
for dict in *.scel; do scel2org $dict -o orgfile/$dict.org ; done
cp ../pyPhrase.org orgfile/
cat ../orgfile/* | sort | uniq > dicts.org
If you are lazy like me, just fork this repo, and run convert.sh