fkxxyz / rime-cloverpinyin

🍀️四叶草拼音输入方案,做最好用的基于rime开源的简体拼音输入方案!
https://www.fkxxyz.com/d/cloverpinyin/
GNU Lesser General Public License v3.0
1.79k stars 127 forks source link

自定义短语没法启用啊? #127

Open disjuno opened 2 years ago

disjuno commented 2 years ago

custom_phrase: # 没用启动 dictionary: "" user_dict: custom_phrase db_class: stabledb enable_completion: true enable_sentence: true initial_quality: 1

这代码没有错吧,怎么不能用呢,往预设的词典里加入自己的词语也不能启用

disjuno commented 2 years ago

或者clover 有什么好用的加入自定义短语的技巧,求指点

DermotHsueh commented 1 year ago

同问

DermotHsueh commented 1 year ago

解决了。不是在 clover.schema.yaml 里设置,而是创建一个 clover.custom.yaml 文件,在该文件里添加:

patch:
  engine/translators:
    - punct_translator
    - reverse_lookup_translator
    - script_translator
    - table_translator@custom_phrase
    - table_translator
  custom_phrase:
    dictionary: ""
    user_dict: custom_phrase
    db_class: stabledb
    enable_completion: false
    enable_sentence: false
    initial_quality: 1

最后,重新部署即可。