ubuntu-install-rime

Ref:www.jianshu.com/p/01bfce3239e6

Install ibus

使用第三方源是因为这个原因

1
2
3
wget -c https://github.com/hchunhui/ibus-rime.AppImage/releases/download/continuous/ibus-rime-x86_64.AppImage -P ~/.local/bin
chmod +x ~/.local/bin/ibus-rime-x86_64.AppImage
~/.local/bin/ibus-rime-x86_64.AppImage
1
sudo apt -y install ibus-rime

Rime Config

1
git clone https://github.com/Mintimate/oh-my-rime.git $HOME/.config/ibus/rime
1
git clone https://github.com/iDvel/rime-ice.git $HOME/.config/ibus/rime
$HOME/.config/ibus/rime/ibus_rime.custom.yaml
1
2
3
4
5
patch:
style/horizontal: true
key_binder/bindings:
- {when: has_menu, accept: minus, send: Page_Up}
- {when: has_menu, accept: equal, send: Page_Down}

Ubuntu Config

Settings -> Keyboard -> Input Sources -> add as below:

1
2
English(US)
Chinese(Rime)

Settings -> Region & Language -> Input Sources -> add as below:

1
2
English(US)
Chinese(Rime)

System Settings -> Text Entry -> Input sources to use -> add as below:

1
2
English(US)
Chinese(Rime)(IBus)

使用万象语法模型

这里下载最新的模型文件

1
wget -c https://github.com/amzxyz/RIME-LMDG/releases/download/v2n3/amz-v2n3m1-zh-hans.gram -P ~/.config/ibus/rime/

修改下列文件:

~/.config/ibus/rime/rime_mint.custom.yaml
1
2
3
4
5
6
7
8
9
patch:
# 公共版本
"grammar/language": amz-v2n3m1-zh-hans
"grammar/collocation_max_length": 5
"grammar/collocation_min_length": 2
"translator/contextual_suggestions": true
"translator/max_homophones": 7
"translator/max_homographs": 7
"codeLengthLimit_processor": 50 # 默认限制了25个字符

最后重新部署即可

参考文档www.mintimate.cc/zh/guide/languageModel.html