diff --git a/README.md b/README.md index e3c5d8f..eae6a87 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@
-[RIME(Rime Input Method Engine) / 中州韵输入法引擎](https://rime.im/) 是一个跨平台的输入法算法框架。 +[Rime Input Method Engine / 中州韵输入法引擎](https://rime.im/) 是一个跨平台的输入法算法框架。 这里是 Rime 的一份配置仓库,用户需要下载各平台对应的前端,并将此配置应用到配置目录。 @@ -34,6 +34,7 @@ - [数字、人民币大写](https://wb98.gitee.io/) - 日期、时间、星期、[农历](https://github.com/boomker/rime-fast-xhup) - 常见错音错字提示 + - 置顶候选项 - 所有标点符号直接上屏,/ 模式改为 v 模式,/ 直接上屏 - 增加了许多拼音纠错 - 简体字表、词库 @@ -66,7 +67,7 @@ 维护内容主要是异形词、错别字的校对,错误注音的修正,缺失的常用词汇的增添,词频的调整。 -欢迎在词库方面提 issue,我会及时更新修正。 +欢迎在词库方面提 issue [#666](https://github.com/iDvel/rime-ice/issues/666) ,我会及时更新修正。
@@ -86,38 +87,53 @@ ### 东风破 [plum](https://github.com/rime/plum) -所有配方(`others/recipes/*.recipe.yaml`)只是简单地更新覆盖文件,适合更新词库时使用。后四个配方只是更新词库文件,并不更新 `rime_ice.dict.yaml` 和 `melt_eng.dict.yaml`,因为用户可能会挂载其他词库。如果更新后部署时报错,可能是增、删、改了文件名,需要检查上面两个文件和词库的对应关系。 +选择配方(`others/recipes/*.recipe.yaml`)来进行安装或更新。 -安装或更新:全部文件 +词库配方只是更新具体词库文件,并不更新 `rime_ice.dict.yaml` 和 `melt_eng.dict.yaml`,因为用户可能会挂载其他词库。如果更新后部署时报错,可能是增、删、改了文件名,需要检查上面两个文件和词库的对应关系。 + +℞ 安装或更新全部文件 ``` bash rime-install iDvel/rime-ice:others/recipes/full ``` -安装或更新:所有词库文件(包含下面三个) +℞ 安装或更新所有词库文件(包含下面三个) ``` bash rime-install iDvel/rime-ice:others/recipes/all_dicts ``` -安装或更新:拼音词库文件 +℞ 安装或更新拼音词库文件( `cn_dicts/` 目录内所有文件) ``` bash rime-install iDvel/rime-ice:others/recipes/cn_dicts ``` -安装或更新:英文词库文件 +℞ 安装或更新英文词库文件( `en_dicts/` 目录内所有文件) ``` bash rime-install iDvel/rime-ice:others/recipes/en_dicts ``` -安装或更新:opencc(emoji) +℞ 安装或更新 opencc ( `opencc/` 目录内所有文件) ``` bash rime-install iDvel/rime-ice:others/recipes/opencc ``` +下面这个配方会在 `radical_pinyin.custom.yaml` 和 `melt_eng.custom.yaml` 里将 `speller/algebra` 修改为对应的双拼拼写,选择一个自己使用的双拼作为参数。 + +℞ 双拼补丁 + +``` +bash rime-install iDvel/rime-ice:others/recipes/config:schema=flypy +bash rime-install iDvel/rime-ice:others/recipes/config:schema=double_pinyin +bash rime-install iDvel/rime-ice:others/recipes/config:schema=mspy +bash rime-install iDvel/rime-ice:others/recipes/config:schema=sogou +bash rime-install iDvel/rime-ice:others/recipes/config:schema=abc +bash rime-install iDvel/rime-ice:others/recipes/config:schema=ziguang +``` + ### 仓输入法 [Hamster](https://github.com/imfuxiao/Hamster) 参考 [如何导入"雾淞拼音输入方案"](https://github.com/imfuxiao/Hamster/wiki/%E5%A6%82%E4%BD%95%E5%AF%BC%E5%85%A5%22%E9%9B%BE%E6%B7%9E%E6%8B%BC%E9%9F%B3%E8%BE%93%E5%85%A5%E6%96%B9%E6%A1%88%22) @@ -160,9 +176,10 @@ patch: # 以下根据自己所需自行定义,仅做参考。 # 针对对应处方的定制条目,请使用 .custom.yaml 中配置,例如 rime_ice.custom.yaml __patch: - key_binder/+: - select_first_character: "bracketleft" # 即 [ - select_last_character: "bracketright" # 即 ] + key_binder/bindings/+: + # 开启逗号句号翻页 + - { when: paging, accept: comma, send: Page_Up } + - { when: has_menu, accept: period, send: Page_Down } ``` @@ -181,11 +198,7 @@ patch: 搜狗转 Rime:[lewangdev/scel2txt](https://github.com/lewangdev/scel2txt) -大量参考: - -- [校对标准论坛](http://www.jiaodui.com/bbs/) -- [汉典](https://www.zdic.net/) -- [成语典](https://dict.idioms.moe.edu.tw/) +大量参考 [校对标准论坛](http://www.jiaodui.com/bbs/) Thanks to JetBrains for the OSS development license. diff --git a/default.yaml b/default.yaml index 9cb1e85..f3d6f73 100644 --- a/default.yaml +++ b/default.yaml @@ -3,7 +3,7 @@ # 要比共享目录的同名文件的 config_version 大才可以生效 -config_version: '2024-01-29' +config_version: '2024-02-05' # 方案列表 @@ -11,7 +11,7 @@ schema_list: # 可以直接删除或注释不需要的方案,对应的 *.schema.yaml 方案文件也可以直接删除 # 除了 t9,它依赖于 rime_ice,用九宫格别删 rime_ice.schema.yaml - schema: rime_ice # 雾凇拼音(全拼) - - schema: t9 # 雾凇拼音(九宫格) + - schema: t9 # 九宫格(仓输入法) - schema: double_pinyin # 自然码双拼 - schema: double_pinyin_abc # 智能 ABC 双拼 - schema: double_pinyin_mspy # 微软双拼 @@ -33,14 +33,14 @@ switcher: hotkeys: - F4 - Control+grave - # - Alt+grave - Control+Shift+grave + # - Alt+grave save_options: # 开关记忆(方案中的 switches),从方案选单(而非快捷键)切换时会记住的选项,需要记忆的开关不能设定 reset - ascii_punct - traditionalization - emoji - full_shape - - single_char + - search_single_char fold_options: true # 呼出时是否折叠,多方案时建议折叠 true ,一个方案建议展开 false abbreviate_options: true # 折叠时是否缩写选项 option_list_separator: ' / ' # 折叠时的选项分隔符 @@ -155,16 +155,14 @@ punctuator: # 处理符合特定规则的输入码,如网址、反查 -# 此处配置所有方案通用的;各方案中另设专有的,比如全拼的拼字用 u,双拼的拼字用 L +# 此处配置较为通用的选项,各方案中另增加了和方案功能绑定的 patterns。 recognizer: patterns: - email: "^[A-Za-z][-_.0-9A-Za-z]*@.*$" # 自带的,email 正则 - # uppercase: "[A-Z][-_+.'0-9A-Za-z]*$" # 自带的,大写字母开头后,可以输入[-_+.'0-9A-Za-z]这些字符(和雾凇有些冲突,关闭了) - url: "^(www[.]|https?:|ftp[.:]|mailto:|file:).*$|^[a-z]+[.].+$" # 自带的,URL 正则 - # 一些不直接上屏的配置示例: - underscore: "^[A-Za-z]+_.*" # 下划线不上屏 - # url_2: "^[A-Za-z]+[.].*" # 句号不上屏,支持 google.com abc.txt 等网址或文件名,使用句号翻页时需要注释掉 - # colon: "^[A-Za-z]+:.*" # 冒号不上屏 + email: "^[A-Za-z][-_.0-9A-Za-z]*@.*$" # email @ 之后不上屏 + url: "^(www[.]|https?:|ftp[.:]|mailto:|file:).*$|^[a-z]+[.].+$" # URL + underscore: "^[A-Za-z]+_.*" # 下划线不上屏 + # url_2: "^[A-Za-z]+[.].*" # 句号不上屏,支持 google.com abc.txt 等网址或文件名,使用句号翻页时需要注释掉 + # colon: "^[A-Za-z]+:.*" # 冒号不上屏 # 快捷键 @@ -197,19 +195,18 @@ key_binder: # - { when: paging, accept: bracketleft, send: Page_Up } # - { when: has_menu, accept: bracketright, send: Page_Down } - # 鼠须管在 Sublime Text、Telegram 等个别软件中无法使用 Control+Shift+数字 的快捷键,可暂时用方案选单切换。 # 两种按键配置,鼠须管 Control+Shift+4 生效,小狼毫 Control+Shift+dollar 生效,都写上了。 # numbered_mode_switch: - # - { when: always, accept: Control+Shift+1, select: .next } # 在最近的两个方案之间切换 - # - { when: always, accept: Control+Shift+exclam, select: .next } # 在最近的两个方案之间切换 - # - { when: always, accept: Control+Shift+2, toggle: ascii_mode } # 切换中英 - # - { when: always, accept: Control+Shift+at, toggle: ascii_mode } # 切换中英 - - { when: always, accept: Control+Shift+3, toggle: ascii_punct } # 切换中英标点 - - { when: always, accept: Control+Shift+numbersign, toggle: ascii_punct } # 切换中英标点 - - { when: always, accept: Control+Shift+4, toggle: traditionalization } # 切换简繁 - - { when: always, accept: Control+Shift+dollar, toggle: traditionalization } # 切换简繁 - # - { when: always, accept: Control+Shift+5, toggle: full_shape } # 切换全半角 - # - { when: always, accept: Control+Shift+percent, toggle: full_shape } # 切换全半角 + # - { when: always, select: .next, accept: Control+Shift+1 } # 在最近的两个方案之间切换 + # - { when: always, select: .next, accept: Control+Shift+exclam } # 在最近的两个方案之间切换 + # - { when: always, toggle: ascii_mode, accept: Control+Shift+2 } # 切换中英 + # - { when: always, toggle: ascii_mode, accept: Control+Shift+at } # 切换中英 + - { when: always, toggle: ascii_punct, accept: Control+Shift+3 } # 切换中英标点 + - { when: always, toggle: ascii_punct, accept: Control+Shift+numbersign } # 切换中英标点 + - { when: always, toggle: traditionalization, accept: Control+Shift+4 } # 切换简繁 + - { when: always, toggle: traditionalization, accept: Control+Shift+dollar } # 切换简繁 + # - { when: always, toggle: full_shape, accept: Control+Shift+5 } # 切换全半角 + # - { when: always, toggle: full_shape, accept: Control+Shift+percent } # 切换全半角 # emacs_editing: # - { when: composing, accept: Control+p, send: Up } diff --git a/double_pinyin.schema.yaml b/double_pinyin.schema.yaml index 84f34df..e74174d 100644 --- a/double_pinyin.schema.yaml +++ b/double_pinyin.schema.yaml @@ -8,9 +8,8 @@ # 全拼的自定义文本和双拼有些冲突,改成了 custom_phrase_double ,需要创建 custom_phrase_double.txt 文件。 # # 目前配置中有个别功能仍然是全拼拼写,不能自动适配,所以需要手动修改一下: -# 1. 中英混输词库的拼写: 在英文词库文件 melt_eng.dict.yaml 修改为对应的双拼词库 -# 2. 英文中部分符号的派生规则:在英文方案文件 melt_eng.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 -# 3. 部件拆字的拼写规则: 在部件拆字方案 radical_pinyin.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 +# - 英文中部分符号的派生规则:在英文方案文件 melt_eng.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 +# - 部件拆字的拼写规则:在部件拆字方案 radical_pinyin.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 # 打个补丁一劳永逸,补丁写法参考 [常见问题](https://github.com/iDvel/rime-ice/issues/133) @@ -30,8 +29,9 @@ schema: # 开关 -# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 # reset: 默认状态。注释掉后,切换窗口时不会重置到默认状态。 +# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 +# abbrev: 默认的缩写取 states 的第一个字符,abbrev 可自定义一个字符 switches: - name: ascii_mode states: [ 中, A ] @@ -151,7 +151,7 @@ reduce_english_filter: # Lua 配置: 置顶候选项 -#TODO 文档和示例 +# 请参考 rime_ice.schema.yaml 中的注释 pin_cand_filter: # 格式:编码字词1字词2…… - d 的 @@ -197,6 +197,7 @@ translator: - "xform/(^|[ '])u/$1sh/" - xform/([jqxy])v/$1u/ - xform/([nl])v/$1ü/ + - xform/ü/v/ # ü 显示为 v # 次翻译器,英文 @@ -272,7 +273,9 @@ radical_lookup: # 部件拆字滤镜 radical_reverse_lookup: tags: [ radical_lookup ] - dictionary: rime_ice # 拼音标注来源,可将 other/single_pinyin.reverse.bin 拷贝至 build/ 目录,此处改为 single_pinyin 来为所有字显示拼音 + # 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: rime_ice # comment_format: # 自定义 comment,例如在左右加上括号 # - xform/^/(/ # - xform/$/)/ diff --git a/double_pinyin_abc.schema.yaml b/double_pinyin_abc.schema.yaml index 42da69e..d8e1058 100644 --- a/double_pinyin_abc.schema.yaml +++ b/double_pinyin_abc.schema.yaml @@ -8,9 +8,8 @@ # 全拼的自定义文本和双拼有些冲突,改成了 custom_phrase_double ,需要创建 custom_phrase_double.txt 文件。 # # 目前配置中有个别功能仍然是全拼拼写,不能自动适配,所以需要手动修改一下: -# 1. 中英混输词库的拼写: 在英文词库文件 melt_eng.dict.yaml 修改为对应的双拼词库 -# 2. 英文中部分符号的派生规则:在英文方案文件 melt_eng.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 -# 3. 部件拆字的拼写规则: 在部件拆字方案 radical_pinyin.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 +# - 英文中部分符号的派生规则:在英文方案文件 melt_eng.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 +# - 部件拆字的拼写规则:在部件拆字方案 radical_pinyin.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 # 打个补丁一劳永逸,补丁写法参考 [常见问题](https://github.com/iDvel/rime-ice/issues/133) @@ -30,8 +29,9 @@ schema: # 开关 -# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 # reset: 默认状态。注释掉后,切换窗口时不会重置到默认状态。 +# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 +# abbrev: 默认的缩写取 states 的第一个字符,abbrev 可自定义一个字符 switches: - name: ascii_mode states: [ 中, A ] @@ -151,7 +151,7 @@ reduce_english_filter: # Lua 配置: 置顶候选项 -#TODO 文档和示例 +# 请参考 rime_ice.schema.yaml 中的注释 pin_cand_filter: # 格式:编码字词1字词2…… - d 的 @@ -200,6 +200,7 @@ translator: - xform/0(\w)/$1/ - xform/([nl])v/$1ü/ - xform/([jqxy])v/$1u/ + - xform/ü/v/ # ü 显示为 v # 次翻译器,英文 @@ -275,7 +276,9 @@ radical_lookup: # 部件拆字滤镜 radical_reverse_lookup: tags: [ radical_lookup ] - dictionary: rime_ice # 拼音标注来源,可将 other/single_pinyin.reverse.bin 拷贝至 build/ 目录,此处改为 single_pinyin 来为所有字显示拼音 + # 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: rime_ice # comment_format: # 自定义 comment,例如在左右加上括号 # - xform/^/(/ # - xform/$/)/ diff --git a/double_pinyin_flypy.schema.yaml b/double_pinyin_flypy.schema.yaml index b3702a7..6ed8559 100644 --- a/double_pinyin_flypy.schema.yaml +++ b/double_pinyin_flypy.schema.yaml @@ -8,9 +8,8 @@ # 全拼的自定义文本和双拼有些冲突,改成了 custom_phrase_double ,需要创建 custom_phrase_double.txt 文件。 # # 目前配置中有个别功能仍然是全拼拼写,不能自动适配,所以需要手动修改一下: -# 1. 中英混输词库的拼写: 在英文词库文件 melt_eng.dict.yaml 修改为对应的双拼词库 -# 2. 英文中部分符号的派生规则:在英文方案文件 melt_eng.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 -# 3. 部件拆字的拼写规则: 在部件拆字方案 radical_pinyin.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 +# - 英文中部分符号的派生规则:在英文方案文件 melt_eng.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 +# - 部件拆字的拼写规则:在部件拆字方案 radical_pinyin.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 # 打个补丁一劳永逸,补丁写法参考 [常见问题](https://github.com/iDvel/rime-ice/issues/133) @@ -30,8 +29,9 @@ schema: # 开关 -# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 # reset: 默认状态。注释掉后,切换窗口时不会重置到默认状态。 +# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 +# abbrev: 默认的缩写取 states 的第一个字符,abbrev 可自定义一个字符 switches: - name: ascii_mode states: [ 中, A ] @@ -151,7 +151,7 @@ reduce_english_filter: # Lua 配置: 置顶候选项 -#TODO 文档和示例 +# 请参考 rime_ice.schema.yaml 中的注释 pin_cand_filter: # 格式:编码字词1字词2…… - d 的 @@ -197,6 +197,7 @@ translator: - "xform/(^|[ '])u/$1sh/" - xform/([jqxy])v/$1u/ - xform/([nl])v/$1ü/ + - xform/ü/v/ # ü 显示为 v # 次翻译器,英文 @@ -272,7 +273,9 @@ radical_lookup: # 部件拆字滤镜 radical_reverse_lookup: tags: [ radical_lookup ] - dictionary: rime_ice # 拼音标注来源,可将 other/single_pinyin.reverse.bin 拷贝至 build/ 目录,此处改为 single_pinyin 来为所有字显示拼音 + # 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: rime_ice # comment_format: # 自定义 comment,例如在左右加上括号 # - xform/^/(/ # - xform/$/)/ diff --git a/double_pinyin_mspy.schema.yaml b/double_pinyin_mspy.schema.yaml index 2e3571c..669678a 100644 --- a/double_pinyin_mspy.schema.yaml +++ b/double_pinyin_mspy.schema.yaml @@ -8,9 +8,8 @@ # 全拼的自定义文本和双拼有些冲突,改成了 custom_phrase_double ,需要创建 custom_phrase_double.txt 文件。 # # 目前配置中有个别功能仍然是全拼拼写,不能自动适配,所以需要手动修改一下: -# 1. 中英混输词库的拼写: 在英文词库文件 melt_eng.dict.yaml 修改为对应的双拼词库 -# 2. 英文中部分符号的派生规则:在英文方案文件 melt_eng.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 -# 3. 部件拆字的拼写规则: 在部件拆字方案 radical_pinyin.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 +# - 英文中部分符号的派生规则:在英文方案文件 melt_eng.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 +# - 部件拆字的拼写规则:在部件拆字方案 radical_pinyin.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 # 打个补丁一劳永逸,补丁写法参考 [常见问题](https://github.com/iDvel/rime-ice/issues/133) @@ -30,8 +29,9 @@ schema: # 开关 -# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 # reset: 默认状态。注释掉后,切换窗口时不会重置到默认状态。 +# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 +# abbrev: 默认的缩写取 states 的第一个字符,abbrev 可自定义一个字符 switches: - name: ascii_mode states: [ 中, A ] @@ -151,7 +151,7 @@ reduce_english_filter: # Lua 配置: 置顶候选项 -#TODO 文档和示例 +# 请参考 rime_ice.schema.yaml 中的注释 pin_cand_filter: # 格式:编码字词1字词2…… - d 的 @@ -201,6 +201,7 @@ translator: - "xform/(^|[ '])u/$1sh/" - xform/([jqxy])v/$1u/ - xform/([nl])v/$1ü/ + - xform/ü/v/ # ü 显示为 v # 次翻译器,英文 @@ -276,7 +277,9 @@ radical_lookup: # 部件拆字滤镜 radical_reverse_lookup: tags: [ radical_lookup ] - dictionary: rime_ice # 拼音标注来源,可将 other/single_pinyin.reverse.bin 拷贝至 build/ 目录,此处改为 single_pinyin 来为所有字显示拼音 + # 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: rime_ice # comment_format: # 自定义 comment,例如在左右加上括号 # - xform/^/(/ # - xform/$/)/ diff --git a/double_pinyin_sogou.schema.yaml b/double_pinyin_sogou.schema.yaml index 4a75994..13a646a 100644 --- a/double_pinyin_sogou.schema.yaml +++ b/double_pinyin_sogou.schema.yaml @@ -8,9 +8,8 @@ # 全拼的自定义文本和双拼有些冲突,改成了 custom_phrase_double ,需要创建 custom_phrase_double.txt 文件。 # # 目前配置中有个别功能仍然是全拼拼写,不能自动适配,所以需要手动修改一下: -# 1. 中英混输词库的拼写: 在英文词库文件 melt_eng.dict.yaml 修改为对应的双拼词库 -# 2. 英文中部分符号的派生规则:在英文方案文件 melt_eng.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 -# 3. 部件拆字的拼写规则: 在部件拆字方案 radical_pinyin.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 +# - 英文中部分符号的派生规则:在英文方案文件 melt_eng.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 +# - 部件拆字的拼写规则:在部件拆字方案 radical_pinyin.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 # 打个补丁一劳永逸,补丁写法参考 [常见问题](https://github.com/iDvel/rime-ice/issues/133) @@ -30,8 +29,9 @@ schema: # 开关 -# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 # reset: 默认状态。注释掉后,切换窗口时不会重置到默认状态。 +# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 +# abbrev: 默认的缩写取 states 的第一个字符,abbrev 可自定义一个字符 switches: - name: ascii_mode states: [ 中, A ] @@ -151,7 +151,7 @@ reduce_english_filter: # Lua 配置: 置顶候选项 -#TODO 文档和示例 +# 请参考 rime_ice.schema.yaml 中的注释 pin_cand_filter: # 格式:编码字词1字词2…… - d 的 @@ -201,6 +201,7 @@ translator: - "xform/(^|[ '])u/$1sh/" - xform/([jqxy])v/$1u/ - xform/([nl])v/$1ü/ + - xform/ü/v/ # ü 显示为 v # 次翻译器,英文 @@ -276,7 +277,9 @@ radical_lookup: # 部件拆字滤镜 radical_reverse_lookup: tags: [ radical_lookup ] - dictionary: rime_ice # 拼音标注来源,可将 other/single_pinyin.reverse.bin 拷贝至 build/ 目录,此处改为 single_pinyin 来为所有字显示拼音 + # 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: rime_ice # comment_format: # 自定义 comment,例如在左右加上括号 # - xform/^/(/ # - xform/$/)/ diff --git a/double_pinyin_ziguang.schema.yaml b/double_pinyin_ziguang.schema.yaml index b0dfca3..a13bd2e 100644 --- a/double_pinyin_ziguang.schema.yaml +++ b/double_pinyin_ziguang.schema.yaml @@ -8,9 +8,8 @@ # 全拼的自定义文本和双拼有些冲突,改成了 custom_phrase_double ,需要创建 custom_phrase_double.txt 文件。 # # 目前配置中有个别功能仍然是全拼拼写,不能自动适配,所以需要手动修改一下: -# 1. 中英混输词库的拼写: 在英文词库文件 melt_eng.dict.yaml 修改为对应的双拼词库 -# 2. 英文中部分符号的派生规则:在英文方案文件 melt_eng.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 -# 3. 部件拆字的拼写规则: 在部件拆字方案 radical_pinyin.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 +# - 英文中部分符号的派生规则:在英文方案文件 melt_eng.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 +# - 部件拆字的拼写规则:在部件拆字方案 radical_pinyin.schema.yaml > speller > algebra 修改为对应的双拼拼写运算 # 打个补丁一劳永逸,补丁写法参考 [常见问题](https://github.com/iDvel/rime-ice/issues/133) @@ -30,8 +29,9 @@ schema: # 开关 -# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 # reset: 默认状态。注释掉后,切换窗口时不会重置到默认状态。 +# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 +# abbrev: 默认的缩写取 states 的第一个字符,abbrev 可自定义一个字符 switches: - name: ascii_mode states: [ 中, A ] @@ -151,7 +151,7 @@ reduce_english_filter: # Lua 配置: 置顶候选项 -#TODO 文档和示例 +# 请参考 rime_ice.schema.yaml 中的注释 pin_cand_filter: # 格式:编码字词1字词2…… - d 的 @@ -199,6 +199,7 @@ translator: - "xform/(^|[ '])i/$1sh/" - xform/0(\w)/$1/ # 好了,現在可以把零聲母拿掉啦 - xform/([nljqxy])v/$1ü/ # 這樣纔是漢語拼音 :-) + - xform/ü/v/ # ü 显示为 v # 次翻译器,英文 @@ -274,7 +275,9 @@ radical_lookup: # 部件拆字滤镜 radical_reverse_lookup: tags: [ radical_lookup ] - dictionary: rime_ice # 拼音标注来源,可将 other/single_pinyin.reverse.bin 拷贝至 build/ 目录,此处改为 single_pinyin 来为所有字显示拼音 + # 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: rime_ice # comment_format: # 自定义 comment,例如在左右加上括号 # - xform/^/(/ # - xform/$/)/ diff --git a/others/CHANGELOG.md b/others/CHANGELOG.md index 7dcffe0..e3d511a 100644 --- a/others/CHANGELOG.md +++ b/others/CHANGELOG.md @@ -6,18 +6,18 @@ ## 2024-02-04 ⚠️ -⚠️ 中英混输词库由英文方案附属切换到单独的 table_translator +⚠️ 中英混输词库由英文方案附属切换到单独的 table_translator ([#662](https://github.com/iDvel/rime-ice/pull/662)) - 词库文件由 `cn_en*.dict.yaml` 变为 `cn_en*.txt` - 双拼不再需要去 `melt_eng.dict.yaml` 更改引用词库 ## 2024-02-01 🆕 -🆕 `pin_cand_filter.lua` 置顶候选项 [#586](https://github.com/iDvel/rime-ice/issues/586) +`pin_cand_filter.lua` 置顶候选项 [#586](https://github.com/iDvel/rime-ice/issues/586) ## 2024-01-29 🆕 ⚠️ -🆕 [部件拆字方案](https://github.com/mirtlecn/rime-radical-pinyin) 反查、辅码 ([#643](https://github.com/iDvel/rime-ice/pull/643)) +[部件拆字方案](https://github.com/mirtlecn/rime-radical-pinyin) 反查、辅码 ([#643](https://github.com/iDvel/rime-ice/pull/643)) - 反查:默认以 `uU` 开头 - 辅码:默认以 `` ` ``(反引号)开启查询 @@ -89,9 +89,9 @@ - 增加 Lua 脚本 `autocap_filter.lua` - 修改了 `melt_eng.schema.yaml` 拼写派生规则。 -## 2023-06-15 🐛 +## 2023-05-24 🐛 -修复全拼方案模糊音派生规则 +修复全拼方案模糊音派生规则 [6c0618a](https://github.com/iDvel/rime-ice/commit/6c0618aeaf2910482e20ff1c057f482aaa98c051) ## 2023-05-13 🆕 diff --git a/others/script/rime/cn_en.go b/others/script/rime/cn_en.go index d20973f..85063ed 100644 --- a/others/script/rime/cn_en.go +++ b/others/script/rime/cn_en.go @@ -480,13 +480,14 @@ func CnEn() { } uniq.Add(line) for _, schema := range schemas { - codes := textToPinyin(line, schema) - _, err := schema.file.WriteString(line + "\t" + codes[0] + "\n") + code := textToPinyin(line, schema) + _, err := schema.file.WriteString(line + "\t" + code + "\n") if err != nil { log.Fatalln(err) } - if codes[0] != codes[1] { - _, err := schema.file.WriteString(line + "\t" + codes[1] + "\n") + lowerCode := strings.ToLower(code) + if code != lowerCode { + _, err := schema.file.WriteString(line + "\t" + lowerCode + "\n") if err != nil { log.Fatalln(err) } @@ -519,8 +520,8 @@ func writePrefix(s schema) { } } -// 生成编码,如果包含大写字母,数组中第一个是原大小写,第二个是纯小写 -func textToPinyin(text string, s schema) [2]string { +// 生成编码,返回原大小写 +func textToPinyin(text string, s schema) string { var code string parts := splitMixedWords(text) @@ -552,7 +553,7 @@ func textToPinyin(text string, s schema) [2]string { } } - return [2]string{code, strings.ToLower(code)} + return code } // 中英文分割,去掉间隔号和横杠 diff --git a/others/single_pinyin.reverse.bin b/others/single_pinyin.reverse.bin deleted file mode 100755 index b141618..0000000 Binary files a/others/single_pinyin.reverse.bin and /dev/null differ diff --git a/rime_ice.schema.yaml b/rime_ice.schema.yaml index 88e4897..02d52ae 100644 --- a/rime_ice.schema.yaml +++ b/rime_ice.schema.yaml @@ -6,7 +6,7 @@ schema: schema_id: rime_ice name: 雾凇拼音 - version: "2024-02-01" + version: "2024-02-05" author: - Dvel description: | @@ -18,8 +18,9 @@ schema: # 开关 -# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 # reset: 默认状态。注释掉后,切换窗口时不会重置到默认状态。 +# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。 +# abbrev: 默认的缩写取 states 的第一个字符,abbrev 可自定义一个字符 switches: - name: ascii_mode states: [ 中, A ] @@ -140,7 +141,48 @@ reduce_english_filter: # Lua 配置: 置顶候选项 -#TODO 文档和示例 +# 符合左边的编码(cand.preedit)时,按顺序置顶右边的候选项。只是提升已有候选项的顺序,没有自创编码的功能。 +# 脚本对比的是去掉空格的 cand.preedit,配置里写空格可以生成额外的编码,参考示例。 +# +# cand.preedit 是经过 translator/preedit_format 转换后的编码 +# ⚠️ 注意方案的 preedit_format 设定,如果 v 显示为 ü,那么左边也要写 ü +# ⚠️ 双拼:显示为全拼拼写就要写全拼,如 'shuang pin',显示为双拼拼写就要写双拼,如 'ul pb' +# +# 格式:编码字词1字词2…… +# 按照 YAML 语法,加不加引号都行,也可以这么写 pin_cand_filter: [l 了, 'de 的', "ni hao 你好"] +# +# 示例: +# - 'le 了' # 输入 le 时,置顶「了」 +# - 'la 啦' # 输入 la 时,置顶「啦」 +# - 'ta 他 她 它' # 可以置顶多个字,按顺序排列 +# - 'ta 啊' # ❌ 编码不会产生的字词,不会生效且影响查找效率。自创编码的字词句可以写到 custom_phrase 中。 +# - 'l 了 啦' # 支持单编码,输入 l 时,置顶「了、啦」 +# +### 简拼 +# 支持简拼,简拼加不加空格都行。但需要方案开启简拼,雾凇全拼是默认开启的,双拼默认没开启 +# - s m 什么 +# - wsm 为什么 +# +### Emoji +# 如果词汇有 emoji 映射,在调整排序后,相关 emoji 失去吸附效果,所以要将 emoji 也纳入 +# - kan 看 👀 +# - ni hao 你好 👋 拟好 +# +### 空格的作用: +# 不包含空格,只生成原样: +# - 'nihao 你好' # 只生成 nihao,只有输入完整编码时才起作用,输入 nihao 时首位是「你好」,但输入 nih 时首位可能是「你会 你还」等其他词语 +# 包含空格的词组,额外生成最后一个空格后的拼音的首字母简码: +# - 'ni hao 你好' # 生成 nihao nih +# 包含空格的词组,且结尾以 zh ch sh 开头,再额外生成最后一个空格后的拼音的 zh ch sh 简码: +# - 'bu hao chi 不好吃' # 生成 buhaochi buhaoc buhaoch +# +### 优先级: +# 以下两行,会额外生成 'da z' 'da zh' 的置顶,前两个候选项是「大专、大众」,先写的排在前面 +# - da zhuang 大专 +# - da zhong 大众 +# 如果明确定义了简码形式,则完全使用简码形式 +# - da z 打字 +# - da zh 打仗 pin_cand_filter: # 格式:编码字词1字词2…… # ⚙️ 以下是个人习惯,仅供参考,可以打个补丁来覆盖。 @@ -151,13 +193,13 @@ pin_cand_filter: - r 让 人 - t 他 她 它 祂 - y 与 于 - # - u 在 custom_phrase 置顶 - # - i 在 custom_phrase 置顶 + # - u 在 custom_phrase 置顶了 有 🈶 又 由 + # - i 在 custom_phrase 置顶了 一 1️⃣ 以 已 亦 - o 哦 😮 - p 片 篇 - a 啊 😲 😦 😧 - s 是 时 使 式 - - d 的 地 得 + - d 的 地 得 🉐 - f 发 放 分 - g 个 各 - h 和 或 @@ -190,7 +232,7 @@ pin_cand_filter: - suo 所 - shang 上 ⬆️ ↑ - shuo 说 - - de 的 地 得 + - de 的 地 得 🉐 - dan 但 - dou 都 - dao 到 倒 @@ -366,7 +408,9 @@ radical_lookup: # 部件拆字滤镜 radical_reverse_lookup: tags: [ radical_lookup ] - dictionary: rime_ice # 拼音标注来源,可将 other/single_pinyin.reverse.bin 拷贝至 build/ 目录,此处改为 single_pinyin 来为所有字显示拼音 + # 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: rime_ice # comment_format: # 自定义 comment,例如在左右加上括号 # - xform/^/(/ # - xform/$/)/ @@ -450,11 +494,11 @@ speller: - abbrev/^([zcs]h).+$/$1/ # 超级简拼中,zh ch sh 视为整体(ch'sh → 城市),而不是像这样分开(c'h's'h → 吃好睡好)。 ### v u 转换 - # 雾凇的词库严格按照正确的 u v(ü) 注音的,如 qu 和 nve,支持使用 qv 和 nue 来输入 - # 再增加对其他词库的 qv nue 这种注音的支持 - - derive/^([nl])ue$/$1ve/ + # 雾凇的词库严格按照正确的 u v(ü) 注音的,支持使用 qu/qv nue/nve 来输入 qu nve - derive/^([nl])ve$/$1ue/ - derive/^([jqxy])u/$1v/ + # 以防引入的其他词库没按照正确方式注音,也做一个转换 + - derive/^([nl])ue$/$1ve/ - derive/^([jqxy])v/$1u/ ### 自动纠错 diff --git a/t9.schema.yaml b/t9.schema.yaml index 74c6a9d..448fe7b 100644 --- a/t9.schema.yaml +++ b/t9.schema.yaml @@ -3,7 +3,7 @@ # 适配了仓输入法 [Hamster](https://github.com/imfuxiao/Hamster/) 九宫格布局。 -# 参考于仓作者 [morse.hsiao](https://github.com/imfuxiao) 的示例 +# 参考于仓老师 [morse.hsiao](https://github.com/imfuxiao) 的示例 # # 可选,支持英文: # 1. 解开 `engine/translators` 下的注释 @@ -21,7 +21,7 @@ schema: - Dvel - '[morse.hsiao](https://github.com/imfuxiao)' description: | - 九宫格方案 for 仓输入法 + 九宫格 for 仓输入法 dependencies: - melt_eng # 英文输入,作为次翻译器挂载到拼音方案 @@ -91,7 +91,7 @@ speller: # - derive/^l/n/ # - derive/^n/l/ # …… - # T9拼音穷举,感谢仓作者 [morse.hsiao](https://github.com/imfuxiao) 勤劳的小手。 + # T9拼音穷举,感谢仓老师 [morse.hsiao](https://github.com/imfuxiao) 勤劳的小手。 - derive/[abc]/2/ - derive/[bc]a/22/ - derive/[bc]ai/224/ @@ -321,7 +321,3 @@ speller: - derive/[xy]ue/983/ - derive/zui/984/ - derive/[xyz]un|zuo/986/ - # 仓 TF 119 之前的版本需要: - # 1. 启用大写字母,解开下面的注释 - # - xlit/22233344455566677778889999/AAADDDGGGJJJMMMPPPPTTTWWWW/ - # 2. 删除 rime_ice.dict.yaml 下的大写字母