mirror of
https://github.com/iDvel/rime-ice.git
synced 2026-05-14 00:30:37 +08:00
feat: 支持全拼 V 模式
This commit is contained in:
@@ -9,8 +9,6 @@
|
||||
# 全拼的自定义文本和双拼有些冲突,改成了 custom_phrase_double ,需要创建 custom_phrase_double.txt 文件。
|
||||
#
|
||||
# 中英混输词库 en_dicts/cn_en.dict.yaml 可以删除或修改,里面是写死了的全拼+英文编码。
|
||||
#
|
||||
# v+字母在双拼是正常拼写,有冲突。默认关闭 v 模式,修改可参考 https://github.com/iDvel/rime-ice/issues/58
|
||||
|
||||
|
||||
# 方案说明
|
||||
@@ -35,7 +33,7 @@ switches:
|
||||
states: [ 中, A ]
|
||||
reset: 0
|
||||
- name: full_shape
|
||||
states: [ 半角, 全角 ]
|
||||
# states: [ 半角, 全角 ]
|
||||
reset: 0
|
||||
- name: ascii_punct
|
||||
states: [ 。,, ., ] # 中英标点
|
||||
@@ -75,9 +73,10 @@ engine:
|
||||
- reverse_lookup_translator@liangfen # 反查,两分拼字
|
||||
- lua_translator@unicode # Unicode
|
||||
filters:
|
||||
- simplifier@emoji # Emoji
|
||||
- simplifier@traditionalize # 简繁切换
|
||||
- uniquifier # 去重
|
||||
- simplifier@emoji # Emoji
|
||||
- simplifier@traditionalize # 简繁切换
|
||||
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
|
||||
- uniquifier # 去重
|
||||
|
||||
|
||||
# Lua 配置: 日期、时间、星期、ISO 8601、时间戳的触发关键字
|
||||
@@ -89,6 +88,17 @@ date_translator:
|
||||
timestamp: timestamp # 时间戳: 1669716794
|
||||
|
||||
|
||||
# Lua 配置: 降低部分英语单词在候选项的位置
|
||||
# 详细介绍 https://dvel.me/posts/make-rime-en-better/#短单词置顶的问题
|
||||
# 正常情况: 输入 rug 得到 「1.rug 2.如果 …… 」
|
||||
# 降低之后: 输入 rug 得到 「1.如果 2.rug …… 」
|
||||
reduce_english_filter:
|
||||
# 降低到第 idx 个位置
|
||||
idx: 2
|
||||
# 要降低的单词,匹配的是输入码,即全小写。
|
||||
words: [rug, bus, ship, laos, bail, bam, bans, bib, bos, chic, chit, dab, dag, dal, dit, dub, dug, fab, gam, ger, gus, hem, hep, hud, kat, lam, lax, lex, lug, lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal, sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum]
|
||||
|
||||
|
||||
# 从 default 继承快捷键
|
||||
key_binder:
|
||||
import_preset: default
|
||||
@@ -176,14 +186,14 @@ melt_eng:
|
||||
|
||||
|
||||
# 标点符号
|
||||
# 预设的 punctuation.yaml 包含了 full_shape half_shape (全角和半角的符号映射)
|
||||
# 预设的 symbols.yaml 包含了 full_shape half_shape symbols
|
||||
# symbols 的功能是支持以「/」前缀开头输出一系列字符,自定义的 symbols_custom.yaml 修改成了「v」开头。
|
||||
# 共享目录预设的 punctuation.yaml 包含了 full_shape half_shape (全角和半角的符号映射)
|
||||
# 共享目录预设的 symbols.yaml 包含了 full_shape half_shape symbols
|
||||
# symbols 的功能是支持以「/」前缀开头输出一系列字符,自定义的 symbols_custom_double.yaml 修改成了「v」开头。
|
||||
punctuator:
|
||||
# __include: punctuation:/ # 从共享目录引入预设的 punctuation.yaml
|
||||
# import_preset: symbols # 从共享目录引入预设的 symbols.yaml
|
||||
import_preset: symbols_custom # 从 symbols_custom.yaml 引入自己自定义的
|
||||
# half_shape: # 也可以直接在这里配置
|
||||
# __include: punctuation:/ # 从共享目录引入预设的 punctuation.yaml
|
||||
# import_preset: symbols # 从共享目录引入预设的 symbols.yaml
|
||||
import_preset: symbols_custom # 从 symbols_custom.yaml 引入自己自定义的
|
||||
__include: symbols_custom_double:/ # 从 symbols_custom_double.yaml 替换为适用于双拼的 symbols
|
||||
|
||||
|
||||
# 处理符合特定规则的输入码,如网址、反查
|
||||
@@ -196,7 +206,7 @@ recognizer:
|
||||
win_path: "^[A-Za-z]:.*" # 支持 c:\file\path 之类的路径输入
|
||||
colon: "^[A-Za-z]+:.*" # 上面的超集,可以输入冒号,不会导致句子直接上屏
|
||||
underscore: "^[A-Za-z]+_.*" # 可以输入下划线 _ ,不会导致句子直接上屏
|
||||
# punct: "^v([0-9]|10|[A-Za-z]+)$" # 响应 symbols_custom.yaml 下的 punctuator/symbols,用「v」替换「/」并支持大写
|
||||
punct: "^V([0-9]|10|[A-Za-z]+)$" # 响应 symbols_custom_double.yaml 下的 symbols,用「V」替换「/」并支持大写
|
||||
reverse_lookup: '^L[a-z]+$' # 响应两分的反查
|
||||
unicode: "^U[a-f0-9]+" # 响应 Unicode
|
||||
|
||||
@@ -245,6 +255,7 @@ speller:
|
||||
- xform/ui$/V/
|
||||
- xform/in$/B/
|
||||
- xlit/QWRTYUIOPSDFGHJKLZXCVBNM/qwrtyuiopsdfghjklzxcvbnm/
|
||||
# 超级简拼,有个问题没解决:https://github.com/iDvel/rime-ice/issues/123
|
||||
- abbrev/^(.).+$/$1/
|
||||
# 可输入大写字母。因为上面的双拼拼写规则用掉了大写字母。做了 xlit 转写,同时适配全拼和双拼。
|
||||
- xlit/āḃçďēḟḡĥīĵḱĺḿńōṕɋŕśťūṽẃẋȳź/ABCDEFGHIJKLMNOPQRSTUVWXYZ/
|
||||
|
||||
Reference in New Issue
Block a user