Macos 安装Rime并接入本地模型
- 安装Rime
brew install ruby
git clone --depth=1 https://github.com/Mark24Code/rime-auto-deploy.git --branch latest
cd rime-auto-deploy
./installer.rb
- 修改主题
修改 squirrel.custom.yaml
文件, 设置主题为微信输入法的主题
style:
color_scheme: wechat_light
color_scheme_dark: wechat_dark
- 选择输入法
编辑 default.yaml
文件, 注释不需要的输入法, 只保留小鹤双拼
# 方案列表
schema_list:
# 可以直接删除或注释不需要的方案,对应的 *.schema.yaml 方案文件也可以直接删除
# 除了 t9,它依赖于 rime_ice,用九宫格别删 rime_ice.schema.yaml
# - schema: rime_ice # 雾凇拼音(全拼)
# - schema: t9 # 九宫格(仓输入法)
# - schema: double_pinyin # 自然码双拼
# - schema: double_pinyin_abc # 智能 ABC 双拼
# - schema: double_pinyin_mspy # 微软双拼
# - schema: double_pinyin_sogou # 搜狗双拼
- schema: double_pinyin_flypy # 小鹤双拼
# - schema: double_pinyin_ziguang # 紫光双拼
- 优化双拼输入
创建 melt_eng.custom.yaml
修改英文派生规则:
patch:
# 修改为小鹤双拼的拼写派生规则,因为不在同一个文件了,前面要加上文件名
speller/algebra:
__include: melt_eng.schema.yaml:/algebra_flypy
创建 radical_pinyin.custom.yaml
修改反查及辅码派生规则:
patch:
# 修改为小鹤双拼的拼写派生规则,因为不在同一个文件了,前面要加上文件名
speller/algebra:
__include: radical_pinyin.schema.yaml:/algebra_flypy
创建 double_pinyin_flypy.custom.yaml
: (可选)
patch:
# (按需选择)清空 preedit_format 中的内容,输入时显示双拼编码
translator/preedit_format: []
- 接入大模型
-
下载
amz-v2n3m1-zh-hans.gram
放到配置目录 -
打开
double_pinyin_flypy.schema.yaml
如果是全拼就打开
rime_ice.schema.yaml
,
在文件末尾添加:
__include: octagram #启用语言模型
#语言模型
octagram:
__patch:
grammar:
language: amz-v2n3m1-zh-hans // 不要加后面的扩展名 .gram
collocation_max_length: 5
collocation_min_length: 2
translator/contextual_suggestions: true
translator/max_homophones: 7
translator/max_homographs: 7
配置完成之后, 重新部署
DONE.