fkxxyz / rime-cloverpinyin

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

自定义短语是不是没有这个功能 #66

Open wiwjxx opened 3 years ago

wiwjxx commented 3 years ago

刚入坑Custom_phrase.txt

Rime table

coding: utf-8

@/db_name custom_phrase.txt

@/db_type tabledb

#

用於【朙月拼音】系列輸入方案

【小狼毫】0.9.21 以上

#

請將該文件以UTF-8編碼保存爲

Rime用戶文件夾/custom_phrase.txt

#

碼表各字段以製表符(Tab)分隔

順序爲:文字、編碼、權重(決定重碼的次序、可選)

#

雖然文本碼表編輯較爲方便,但不適合導入大量條目

#

no comment

xxx@gmail.com gmail 1

这个功能是不是没有

68cs commented 2 years ago

一、在用户资料夹创建 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

二、新建一个 txt 文件: Custom_phrase.txt

以「短语」「编码」「词频」的格式来录入自定义短语,中间用键盘「tab」键分隔,每个词一行。例如:

OpenWrt ow  1
  OpenClash oc  1
  鼠须管   sxg 1