docs: 更新一些注释,双拼补丁示例

This commit is contained in:
Dvel
2024-12-06 03:00:07 +08:00
parent aa505b7b2d
commit 277c4d85dc
12 changed files with 131 additions and 125 deletions

View File

@@ -10,7 +10,7 @@
# 目前配置中有个别功能仍然是全拼拼写,不能自动适配,所以需要手动修改一下:
# - 英文中部分符号的派生规则:在英文方案文件 melt_eng.schema.yaml > speller > algebra 修改为对应的双拼拼写运算
# - 部件拆字的拼写规则:在部件拆字方案 radical_pinyin.schema.yaml > speller > algebra 修改为对应的双拼拼写运算
# 打个补丁一劳永逸,补丁写法参考 [常见问题](https://github.com/iDvel/rime-ice/issues/133)
# 打个补丁一劳永逸,补丁写法参考 [常见问题](https://github.com/iDvel/rime-ice/issues/133) 或 others/双拼补丁示例/ 文件夹
# 方案说明
@@ -45,8 +45,8 @@ switches:
- name: full_shape
states: [ 半角, 全角 ]
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
abbrev: [词, 单]
states: [正常, 单字]
abbrev: [词, 单]
# 输入引擎
@@ -106,12 +106,6 @@ date_translator:
lunar: lunar # 农历: 二〇二三年冬月二十 癸卯年(兔)冬月二十
# Lua 配置:为 corrector 格式化 comment占位符为 {comment}
# 默认 "{comment}" 输入 hun dun 时会在「馄饨」旁边生成 hún tun 的 comment
# 例如左右加个括号 "({comment})" 就会变成 (hún tun)
corrector: "{comment}"
# Lua 配置: 降低部分英语单词在候选项的位置。
# 详细介绍 https://dvel.me/posts/make-rime-en-better/#短单词置顶的问题
# 正常情况: 输入 rug 得到 「1.rug 2.如果 …… 」
@@ -240,16 +234,16 @@ custom_phrase:
# Emoji
emoji:
option_name: emoji
opencc_config: emoji.json
inherit_comment: false # 在 corrector.lua 及反查中emoji 返回空注释
option_name: emoji # 对应 switches 中的 name
opencc_config: emoji.json # 选择要加载的 OpenCC 配置
inherit_comment: false # 在 corrector.lua 及反查中emoji 的 comment 显示为空
# 简繁切换
traditionalize:
option_name: traditionalization
opencc_config: s2t.json # s2t.json | s2hk.json | s2tw.json | s2twp.json
tips: none # 转换提示: all 都显示 | char 仅单字显示 | none 不显示。
option_name: traditionalization # 对应 switches 中的 name
opencc_config: s2t.json # s2t.json | s2hk.json | s2tw.json | s2twp.json Rime 内置配置,在程序目录可找到)
tips: none # 转换提示: all 都显示 | char 仅单字显示 | none 不显示。
tags: [ abc, number, gregorian_to_lunar ] # 限制在对应 tag不对其他如反查的内容做简繁转换
@@ -279,8 +273,8 @@ radical_lookup:
# 部件拆字滤镜
radical_reverse_lookup:
tags: [ radical_lookup ]
# dictionary 为拼音标注来源目前是显示本方案词库的注音,可去部件拆字方案下载更全的、带声调的、已编译好的词典
# https://github.com/mirtlecn/rime-radical-pinyin?tab=readme-ov-file#%E5%8F%8D%E6%9F%A5%E5%B8%A6%E5%A3%B0%E8%B0%83%E6%B3%A8%E9%9F%B3
# dictionary 为拼音标注来源目前是显示本方案词库的注音
# 可去部件拆字方案下载更全的、带声调的、已编译好的词典: https://github.com/mirtlecn/rime-radical-pinyin#反查带声调注音
dictionary: rime_ice
# comment_format: # 自定义 comment例如在左右加上括号
# - xform/^/(/
@@ -293,7 +287,7 @@ recognizer:
import_preset: default # 从 default.yaml 继承通用的
patterns: # 再增加方案专有的:
punct: "^V([0-9]|10|[A-Za-z]+)$" # 响应 symbols_caps_v.yaml 的 symbols
radical_lookup: "^uU[a-z;]+$" # 响应部件拆字的反查,与 radical_lookup/prefix 匹配
radical_lookup: "^uU[a-z;]+$" # 响应部件拆字的反查,触发前缀与 radical_lookup/prefix 匹配
unicode: "^U[a-f0-9]+" # 脚本将自动获取第 2 个字符 U 作为触发前缀,响应 lua_translator@*unicode输出 Unicode 字符
number: "^R[0-9]+[.]?[0-9]*" # 脚本将自动获取第 2 个字符 R 作为触发前缀,响应 lua_translator@*number_translator数字金额大写
calculator: "^cC.+" # 响应 lua_translator@*calc_translator计算器。前缀设定项 calculator/prefix