Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法使用 custom.yaml 自定义词典文件(*.dict.yaml) #1469

Open
YueHua2008 opened this issue Feb 5, 2024 · 1 comment
Open

无法使用 custom.yaml 自定义词典文件(*.dict.yaml) #1469

YueHua2008 opened this issue Feb 5, 2024 · 1 comment

Comments

@YueHua2008
Copy link

YueHua2008 commented Feb 5, 2024

我正在尝试自定义仓颉输入方案的词典文件(cangjie5.dict.yaml),因此我在用户文件夹下新建了 cangjie5.dict.custom.yaml ,并输入以下内容:

patch:
  use_preset_vocabulary: false

依据 #360 中的讨论,这样做可以保证仓颉输入方案的候选项中的重码字与仓颉输入法官方预设的排序一致。但重新部署之后,这并没有起作用:输入「水人土」的排序是「淮」在先,「难」在后,与官方排序不一致。

只有当我直接编辑 cangjie5.dict.yaml 并修改 use_preset_vocabularyfalse 时,才可以达到预期的效果(输入「水人土」时,总是确保「难」在第一位,「淮」在第二位)。同时,用 *.custom.yaml 自定义其它不是词典文件的文件(例如 cangjie5.schema.yaml 等)是可以有效果的。

怎样才能正确地自定义词典文件(*.dict.yaml)中的参数呢?

@lotem
Copy link
Member

lotem commented Feb 6, 2024

我正在尝试自定义仓颉输入方案的词典文件(cangjie5.dict.yaml),因此我在用户文件夹下新建了 cangjie5.dict.custom.yaml

不支持这个补丁文件

只有当我直接编辑 cangjie5.dict.yaml 并修改 use_preset_vocabularyfalse

可以这样改

怎样才能正确地自定义词典文件(*.dict.yaml)中的参数呢?

以上那样改。或者另写一个 *.dict.yaml 文件,按需要重写 YAML 配置部分,再通过 import_tables: [ cangjie5 ] 引用 cangjie5.dict.yaml 的码表部分。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants