Open disjuno opened 2 years ago
或者clover 有什么好用的加入自定义短语的技巧,求指点
同问
解决了。不是在 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
最后,重新部署即可。
custom_phrase: # 没用启动 dictionary: "" user_dict: custom_phrase db_class: stabledb enable_completion: true enable_sentence: true initial_quality: 1
这代码没有错吧,怎么不能用呢,往预设的词典里加入自己的词语也不能启用