2023-05-03 13:59:07 +02:00
|
|
|
|
# Rime schema
|
|
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 复制自 rime_ice.schema.yaml ,适配了双拼。
|
|
|
|
|
# 双拼键位映射复制自 https://github.com/rime/rime-double-pinyin
|
|
|
|
|
# 双拼之间主要就是 speller/algebra 和 translator/preedit_format 这里有区别。
|
|
|
|
|
#
|
|
|
|
|
# 全拼的自定义文本和双拼有些冲突,改成了 custom_phrase_double ,需要创建 custom_phrase_double.txt 文件。
|
|
|
|
|
#
|
2023-05-09 15:19:59 +02:00
|
|
|
|
# 默认启用的中英混输词库是全拼的,需要在 melt_eng.dict.yaml 中修改为对应的双拼的。
|
2023-06-15 17:16:01 +02:00
|
|
|
|
# 还需要在英文方案 melt_eng.schema.yaml 将数字的拼写规则 __include: algebra_rime_ice 改为对应的双拼。
|
2023-05-03 13:59:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 方案说明
|
|
|
|
|
schema:
|
|
|
|
|
schema_id: double_pinyin_ziguang
|
|
|
|
|
name: 紫光双拼
|
|
|
|
|
version: "1"
|
|
|
|
|
author:
|
|
|
|
|
- Dvel
|
|
|
|
|
description: |
|
|
|
|
|
雾凇拼音 - 紫光双拼
|
|
|
|
|
https://github.com/iDvel/rime-ice
|
|
|
|
|
dependencies:
|
|
|
|
|
- melt_eng # 英文输入,作为次翻译器挂载到拼音方案
|
|
|
|
|
- liangfen # 两分拼字,作为反查挂载到拼音方案
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 开关
|
|
|
|
|
# 鼠须管 0.16 后,用快捷键切换时的提示文字由 states 定义
|
|
|
|
|
# states: 方案选单显示的名称。可以注释掉,仍可以通过快捷键切换。
|
|
|
|
|
# reset: 默认状态。 注释掉后,切换窗口时不会重置到默认状态。
|
|
|
|
|
switches:
|
|
|
|
|
- name: ascii_mode
|
2023-09-22 13:18:46 +02:00
|
|
|
|
states: [ 中, A ]
|
2023-05-03 13:59:07 +02:00
|
|
|
|
reset: 0
|
|
|
|
|
- name: ascii_punct # 中英标点
|
|
|
|
|
states: [ ¥, $ ]
|
|
|
|
|
reset: 0
|
|
|
|
|
- name: traditionalization
|
|
|
|
|
states: [ 简, 繁 ]
|
|
|
|
|
reset: 0
|
|
|
|
|
- name: emoji
|
|
|
|
|
states: [ 💀, 😄 ]
|
|
|
|
|
reset: 1
|
|
|
|
|
- name: full_shape
|
|
|
|
|
states: [ 半角, 全角 ]
|
|
|
|
|
reset: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 输入引擎
|
|
|
|
|
engine:
|
|
|
|
|
processors:
|
2023-05-21 04:59:21 +02:00
|
|
|
|
- lua_processor@select_character # 以词定字
|
2023-05-03 13:59:07 +02:00
|
|
|
|
- ascii_composer
|
|
|
|
|
- recognizer
|
|
|
|
|
- key_binder
|
|
|
|
|
- speller
|
|
|
|
|
- punctuator
|
|
|
|
|
- selector
|
|
|
|
|
- navigator
|
|
|
|
|
- express_editor
|
|
|
|
|
segmentors:
|
|
|
|
|
- ascii_segmentor
|
|
|
|
|
- matcher
|
|
|
|
|
- abc_segmentor
|
|
|
|
|
- punct_segmentor
|
|
|
|
|
- fallback_segmentor
|
|
|
|
|
translators:
|
|
|
|
|
- punct_translator
|
|
|
|
|
- script_translator
|
2023-05-08 10:42:21 +02:00
|
|
|
|
- lua_translator@date_translator # 时间、日期、星期
|
2024-01-02 15:25:13 +01:00
|
|
|
|
- lua_translator@lunar # 农历
|
2023-05-03 13:59:07 +02:00
|
|
|
|
- table_translator@custom_phrase # 自定义短语 custom_phrase_double.txt
|
|
|
|
|
- table_translator@melt_eng # 英文输入
|
|
|
|
|
- reverse_lookup_translator@liangfen # 反查,两分拼字
|
2023-05-08 10:42:21 +02:00
|
|
|
|
- lua_translator@unicode # Unicode
|
2023-05-12 19:42:30 +02:00
|
|
|
|
- lua_translator@number_translator # 数字、金额大写
|
2023-05-03 13:59:07 +02:00
|
|
|
|
filters:
|
2023-08-06 12:37:28 +02:00
|
|
|
|
- lua_filter@corrector # 错音错字提示
|
2023-05-04 19:41:21 +02:00
|
|
|
|
- simplifier@emoji # Emoji
|
|
|
|
|
- simplifier@traditionalize # 简繁切换
|
2023-05-30 16:06:38 +02:00
|
|
|
|
- lua_filter@autocap_filter # 英文自动大写
|
2023-05-16 16:21:36 +02:00
|
|
|
|
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
|
2023-05-30 16:06:38 +02:00
|
|
|
|
- uniquifier # 去重
|
2023-05-03 13:59:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Lua 配置: 日期、时间、星期、ISO 8601、时间戳的触发关键字
|
|
|
|
|
date_translator:
|
|
|
|
|
date: date # 日期: 2022-11-29
|
|
|
|
|
time: time # 时间: 18:13
|
|
|
|
|
week: week # 星期: 星期二
|
|
|
|
|
datetime: datetime # ISO 8601: 2022-11-29T18:13:11+08:00
|
|
|
|
|
timestamp: timestamp # 时间戳: 1669716794
|
|
|
|
|
|
|
|
|
|
|
2024-01-02 15:25:13 +01:00
|
|
|
|
# Lua 配置:农历
|
|
|
|
|
lunar: lunar # 癸卯年(兔)冬月廿一 二〇二四年冬月廿一
|
|
|
|
|
|
|
|
|
|
|
2024-01-03 16:27:55 +01:00
|
|
|
|
# Lua 配置:为 corrector 格式化 comment,占位符为 {comment}
|
|
|
|
|
# 默认 "{comment}" 输入 hun dun 时会在「馄饨」旁边生成 hún tun 的 comment
|
|
|
|
|
# 例如左右加个括号 "({comment})" 就会变成 (hún tun)
|
|
|
|
|
corrector: "{comment}"
|
|
|
|
|
|
|
|
|
|
|
2023-10-22 09:21:26 +02:00
|
|
|
|
# Lua 配置: 降低部分英语单词在候选项的位置。
|
2023-05-03 13:59:07 +02:00
|
|
|
|
# 详细介绍 https://dvel.me/posts/make-rime-en-better/#短单词置顶的问题
|
|
|
|
|
# 正常情况: 输入 rug 得到 「1.rug 2.如果 …… 」
|
|
|
|
|
# 降低之后: 输入 rug 得到 「1.如果 2.rug …… 」
|
2023-10-22 09:21:26 +02:00
|
|
|
|
# 几种模式:
|
|
|
|
|
# all 降低所有 3~4 位长度、前 2~3 位是完整拼音、最后一位是声母的单词
|
|
|
|
|
# none 不降低任何单词,相当于没有启用这个 Lua
|
2023-12-08 15:40:51 +01:00
|
|
|
|
# custom 自定义,只降低 words 里的
|
2023-10-22 09:21:26 +02:00
|
|
|
|
# (匹配的是编码,不是单词)
|
2023-05-03 13:59:07 +02:00
|
|
|
|
reduce_english_filter:
|
2023-10-22 09:21:26 +02:00
|
|
|
|
mode: custom # all | none | custom
|
|
|
|
|
idx: 2 # 降低到第 idx 个位置
|
|
|
|
|
# 自定义的单词列表,示例列表没有降低部分常用单词,如 and cat mail Mac but bad shit ……
|
|
|
|
|
words: [aid, ann,
|
|
|
|
|
bail, bait, bam, band, bans, bat, bay, bend, bent, benz, bib, bid, bien, biz, boc, bop, bos, bud, buf,
|
|
|
|
|
cab, cad, cain, cam, cans, cap, cas, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur,
|
|
|
|
|
dab, dag, dal, dam, dent, dew, dial, diet, dim, din, dip, dis, dit, doug, dub, dug, dunn,
|
|
|
|
|
fab, fax, fob, fog, foul, fur,
|
|
|
|
|
gag, gail, gain, gal, gam, gaol, ged, gel, ger, guam, gus, gut,
|
|
|
|
|
hail, ham, hank, hans, hat, hay, heil, heir, hem, hep, hud, hum, hung, hunk, hut,
|
|
|
|
|
jim, jug,
|
|
|
|
|
kat,
|
|
|
|
|
lab, lad, lag, laid, lam, laos, lap, lat, lax, lay, led, leg, lex, liam, lib, lid, lied, lien, lies, linn, lip, lit, liz, lob, lug, lund, lung, lux,
|
|
|
|
|
mag, maid, mann, mar, mat, med, mel, mend, mens, ment, mil, mins, mint, mob, moc, mod, mop, mos, mot, mud, mug, mum, nail,
|
|
|
|
|
nap, nat, nay, neil, nib, nip, noun, nous, nun, nut,
|
|
|
|
|
pac, paid, pail, pain, pair, pak, pal, pam, pans, pant, pap, par, pat, paw, pax, pens, pic, pier, pies, pins, pint, pit, pix, pod, pop, pos, pot, pour, pow, pub,
|
2024-01-05 12:32:31 +01:00
|
|
|
|
rand, rant, rent, rep, res, ret, rex, rib, rid, rig, rim, rub, rug, rum, runc, runs,
|
2023-10-22 09:21:26 +02:00
|
|
|
|
sac, sail, sal, sam, sans, sap, saw, sax, sew, sham, shaw, shin, sig, sin, sip, sis, suit, sung, suns, sup, sur, sus,
|
|
|
|
|
tad, tail, taj, tar, tax, tec, ted, tel, ter, tex, tic, tied, tier, ties, tim, tin, tit, tour, tout, tum,
|
2023-11-24 13:08:27 +01:00
|
|
|
|
wag, wand, womens, wap, wax, weir, won,
|
2023-10-22 09:21:26 +02:00
|
|
|
|
yan, yen]
|
2023-05-03 13:59:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 主翻译器,拼音
|
|
|
|
|
translator:
|
2023-07-19 01:32:43 +02:00
|
|
|
|
dictionary: rime_ice # 挂载词库 rime_ice.dict.yaml
|
|
|
|
|
prism: double_pinyin_ziguang # 多方案共用一个词库时,为避免冲突,需要用 prism 指定一个名字。
|
2023-08-06 12:37:28 +02:00
|
|
|
|
spelling_hints: 8 # corrector.lua :为了让错音错字提示的 Lua 同时适配全拼双拼,将拼音显示在 comment 中
|
|
|
|
|
always_show_comments: true # corrector.lua :Rime 默认在 preedit 等于 comment 时取消显示 comment,这里强制一直显示,供 corrector.lua 做判断用。
|
2023-07-19 01:32:43 +02:00
|
|
|
|
initial_quality: 1.2 # 拼音的权重应该比英文大
|
|
|
|
|
preedit_format: # preedit_format 影响到输入框的显示和“Shift+回车”上屏的字符
|
2023-05-03 13:59:07 +02:00
|
|
|
|
- xform/o(\w)/0$1/ # 零聲母先改爲0,以方便後面的轉換
|
|
|
|
|
- xform/([jqxy])n/$1ue/ # 提前轉換雙拼碼 n 和 g,因爲轉換後的拼音裏就快要出現這兩個字母了,那時將難以分辨出雙拼碼
|
|
|
|
|
- xform/([nl])n/$1ve/
|
|
|
|
|
- xform/([dtgkhzcsuai])n/$1ui/
|
|
|
|
|
- xform/([nljqx])g/$1iang/
|
|
|
|
|
- xform/([gkhuai])g/$1uang/
|
|
|
|
|
- xform/(\w)w/$1en/
|
|
|
|
|
- xform/(\w)r/$1an/
|
|
|
|
|
- xform/(\w)t/$1eng/
|
|
|
|
|
- xform/([jqxylmnbp])y/$1in/
|
|
|
|
|
- xform/([zcsuaigkh])y/$1uai/
|
|
|
|
|
- xform/([dtnlgkhrzcsuai])o/$1uo/
|
|
|
|
|
- xform/(\w)q/$1ao/
|
|
|
|
|
- xform/(\w)p/$1ai/
|
|
|
|
|
- xform/(\w)s/$1ang/
|
|
|
|
|
- xform/(\w)d/$1ie/
|
|
|
|
|
- xform/(\w)f/$1ian/
|
|
|
|
|
- xform/([jqx])h/$1iong/
|
|
|
|
|
- xform/([dtnlgkhrzcsuai])h/$1ong/
|
|
|
|
|
- xform/0j/0er/
|
|
|
|
|
- xform/([dnlmjqx])j/$1iu/
|
|
|
|
|
- xform/(\w)k/$1ei/
|
|
|
|
|
- xform/(\w)l/$1uan/
|
|
|
|
|
- xform/(\w)z/$1ou/
|
|
|
|
|
- xform/([jqxl])x/$1ia/
|
|
|
|
|
- xform/([gkhuai])x/$1ua/
|
|
|
|
|
- xform/(\w);/$1ing/
|
|
|
|
|
- xform/(\w)b/$1iao/
|
|
|
|
|
- xform/(\w)m/$1un/
|
|
|
|
|
- "xform/(^|[ '])u/$1zh/" # 復原聲母,音節開始處的雙拼字母a改寫爲zh;其他位置的才真正是a
|
|
|
|
|
- "xform/(^|[ '])a/$1ch/"
|
|
|
|
|
- "xform/(^|[ '])i/$1sh/"
|
|
|
|
|
- xform/0(\w)/$1/ # 好了,現在可以把零聲母拿掉啦
|
|
|
|
|
- xform/([nljqxy])v/$1ü/ # 這樣纔是漢語拼音 :-)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 次翻译器,英文
|
|
|
|
|
melt_eng:
|
|
|
|
|
dictionary: melt_eng # 挂载词库 melt_eng.dict.yaml
|
|
|
|
|
enable_sentence: false # 禁止造句
|
|
|
|
|
enable_user_dict: false # 禁用用户词典
|
|
|
|
|
initial_quality: 1.1 # 初始权重
|
|
|
|
|
comment_format: # 自定义提示码
|
|
|
|
|
- xform/.*// # 清空提示码
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 反查:两分(拼字)
|
|
|
|
|
liangfen:
|
|
|
|
|
dictionary: liangfen # 挂载两分词典 liangfen.dict.yaml
|
|
|
|
|
prefix: "L" # 以 L 开头来反查
|
|
|
|
|
enable_completion: true # 补全提示
|
|
|
|
|
# tips: 〔两分〕 # 反查时显示的文字,建议注释掉,否则很多 L 开头的英文单词也会显示这个
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 自定义短语
|
|
|
|
|
custom_phrase:
|
|
|
|
|
dictionary: ""
|
|
|
|
|
user_dict: custom_phrase_double # 需要手动创建 custom_phrase_double.txt 文件
|
|
|
|
|
db_class: stabledb
|
|
|
|
|
enable_completion: false # 补全提示
|
|
|
|
|
enable_sentence: false # 禁止造句
|
|
|
|
|
initial_quality: 99 # custom_phrase 的权重应该比 pinyin 和 melt_eng 大
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Emoji
|
|
|
|
|
emoji:
|
|
|
|
|
opencc_config: emoji.json
|
|
|
|
|
option_name: emoji
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 简繁切换
|
|
|
|
|
traditionalize:
|
|
|
|
|
option_name: traditionalization
|
|
|
|
|
opencc_config: s2t.json # s2t.json | s2hk.json | s2tw.json | s2twp.json
|
|
|
|
|
tips: none # 转换提示: all 都显示 | char 仅单字显示 | none 不显示。
|
|
|
|
|
excluded_types: [ reverse_lookup ] # 不转换反查(两分拼字)的内容
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 标点符号
|
|
|
|
|
# punctuator 下面有三个子项:
|
|
|
|
|
# full_shape 全角标点映射
|
|
|
|
|
# half_shape 半角标点映射
|
|
|
|
|
# symbols Rime 的预设配置是以 '/' 前缀开头输出一系列字符,自定义的 symbols_caps_v.yaml 修改成了 'V' 开头。
|
|
|
|
|
punctuator:
|
|
|
|
|
full_shape:
|
|
|
|
|
__include: default:/punctuator/full_shape # 从 default.yaml 导入配置
|
|
|
|
|
half_shape:
|
|
|
|
|
__include: default:/punctuator/half_shape # 从 default.yaml 导入配置
|
|
|
|
|
symbols:
|
|
|
|
|
__include: symbols_caps_v:/symbols # 从 symbols_caps_v.yaml 导入配置
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 处理符合特定规则的输入码,如网址、反查
|
|
|
|
|
recognizer:
|
|
|
|
|
import_preset: default # 从 default.yaml 继承通用的
|
|
|
|
|
patterns: # 再增加方案专有的:
|
|
|
|
|
punct: "^V([0-9]|10|[A-Za-z]+)$" # 响应 symbols_caps_v.yaml 的 symbols
|
|
|
|
|
reverse_lookup: "^L[a-z]+$" # 响应两分拼字的反查
|
2024-01-14 16:58:37 +01:00
|
|
|
|
unicode: "^U[a-f0-9]+" # 响应 lua_translator@unicode 脚本将自动获取第 2 个字符作为触发前缀
|
|
|
|
|
number: "^R[0-9]+[.]?[0-9]*" # 响应 lua_translator@number_translator 脚本将自动获取第 2 个字符作为触发前缀
|
2023-05-03 13:59:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 从 default 继承快捷键
|
|
|
|
|
key_binder:
|
|
|
|
|
import_preset: default # 从 default.yaml 继承通用的
|
|
|
|
|
# bindings: # 也可以再增加方案专有的
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 拼写设定
|
|
|
|
|
speller:
|
|
|
|
|
# 如果不想让什么标点直接上屏,可以加在 alphabet,或者编辑标点符号为两个及以上的映射
|
|
|
|
|
alphabet: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA;
|
|
|
|
|
delimiter: " '" # 第一位<空格>是拼音之间的分隔符;第二位<'>表示可以手动输入单引号来分割拼音。
|
|
|
|
|
algebra:
|
|
|
|
|
- erase/^xx$/
|
|
|
|
|
- derive/^([jqxy])u$/$1v/
|
2023-08-07 15:56:46 +02:00
|
|
|
|
- xform/^([aoe].*)$/Ⓞ$1/ # 添上固定的零聲母o,先標記爲大寫O
|
|
|
|
|
- xform/en$/Ⓦ/
|
|
|
|
|
- xform/eng$/Ⓣ/
|
|
|
|
|
- xform/in$|uai$/Ⓨ/
|
|
|
|
|
- xform/^zh/Ⓤ/
|
|
|
|
|
- xform/^sh/Ⓘ/
|
|
|
|
|
- xform/uo$/Ⓞ/
|
|
|
|
|
- xform/ai$/Ⓟ/
|
|
|
|
|
- xform/^ch/Ⓐ/
|
|
|
|
|
- xform/[iu]ang$/Ⓖ/
|
|
|
|
|
- xform/ang$/Ⓢ/ # ang should be placed after iang/uang
|
|
|
|
|
- xform/ie$/Ⓓ/
|
|
|
|
|
- xform/ian$/Ⓕ/
|
2023-10-22 04:15:19 +02:00
|
|
|
|
- xform/(.)i?ong$/$1Ⓗ/
|
2023-08-07 15:56:46 +02:00
|
|
|
|
- xform/er$|iu$/Ⓙ/
|
|
|
|
|
- xform/ei$/Ⓚ/
|
|
|
|
|
- xform/uan$/Ⓛ/
|
2023-05-03 13:59:07 +02:00
|
|
|
|
- xform/ing$/;/
|
2023-08-07 15:56:46 +02:00
|
|
|
|
- xform/ou$/Ⓩ/
|
|
|
|
|
- xform/[iu]a$/Ⓧ/
|
|
|
|
|
- xform/iao$/Ⓑ/
|
|
|
|
|
- xform/ue$|ui$|ve$/Ⓝ/
|
|
|
|
|
- xform/un$/Ⓜ/
|
|
|
|
|
- xform/ao$/Ⓠ/ # ao should be placed after iao
|
|
|
|
|
- xform/an$/Ⓡ/ # an should be placed after uan/ian
|
|
|
|
|
- xlit/ⓌⓉⓎⓊⒾⓄⓅⒶⒼⓈⒹⒻⒽⒿⓀⓁⓏⓍⒷⓃⓂⓆⓇ/wtyuiopagsdfhjklzxbnmqr/
|
2023-10-12 13:59:16 +02:00
|
|
|
|
# - abbrev/^(.).+$/$1/ # 首字母简拼,开启后会导致 3 个字母时 kj'x 变成 k'jx 的问题
|