CN-Input-Dict

Chinese input method under fcitx with words dictionary


Chopong

03 11 PM ,Fri, May 03 2019

Table of Contents

Chinese Version

Background

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

sunpinyin+userdict

  1. download sunpinyin-userdict.7z from here

  2. extrated the package and move it to ~/.sunpinyin/

  3. reboot and sign in.

pinyin+dicts

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
    
  1. download dicts from herefcitx-sougou-phrase-full

  2. 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.

pinyin+dicts(selected)

  1. download **.scel you need from sougou official website

  2. 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
  1. convert .org to .mb with previous method.

If you are lazy like me, just fork this repo, and run convert.sh

Print

Back