在 fcitx 中使用 ibus 的词库
fcitx 一直是我很喜欢的输入法,不过它的词库词条太少,而前段时间试用过的 ibus 的词库则相对好了很多,怎么在 fcitx 中使用 ibus 的词库呢?其实 ibus 使用的是 open-phrase 的开源词库,我们只要在 fcitx 中使用它就可以了。
wget http://open-phrase.googlecode.com/files/phrase_pinyin_freq_sc_20090402.txt.bz2
bunzip2 phrase_pinyin_freq_sc_20090402.txt.bz2
//按词频由高到低排序
sort -k 3gr -k 2n phrase_pinyin_freq_sc_20090402.txt | awk ‘{print $2 ” ” $1}’ > temp
//转化为 GBK 编码
iconv -f UTF-8 -t GBK temp > pyPhrase.org
然后用 pyPhrase.org 覆盖 fcitx 源代码中的同名文件,重新编译即可。
Gentoo 用户可以修改一下 ebuild 文件,在 src_compile 之前加入:
src_unpack() {
unpack ${A}
cd “${S}”
cp “${FILESDIR}”/pyPhrase.org data/
}
记得把改好的 pyPhrase.org 文件放到 /usr/local/portage/app-i18n/fcitx/files 下。
This entry was posted on Sunday, June 14th, 2009 at 10:40 am and is filed under linux. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


