2022-11-26 21:42:11 +01:00
|
|
|
|
# Rime schema
|
|
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
|
|
|
2022-12-02 07:14:59 +01:00
|
|
|
|
# 复制自 rime_ice.schema.yaml ,适配了双拼。
|
2022-11-29 04:15:58 +01:00
|
|
|
|
# 双拼键位映射复制自 https://github.com/rime/rime-double-pinyin
|
2022-12-02 07:14:59 +01:00
|
|
|
|
# 双拼和全拼主要就是 speller/algebra 和 translator/preedit_format 这里有区别。
|
2023-02-26 02:50:14 +01:00
|
|
|
|
#
|
2022-12-02 07:14:59 +01:00
|
|
|
|
# 全拼的自定义文本和双拼有些冲突,改成了 custom_phrase_double ,需要创建 custom_phrase_double.txt 文件。
|
2023-01-03 05:46:18 +01:00
|
|
|
|
#
|
2023-02-26 02:50:14 +01:00
|
|
|
|
# 中英混输词库 en_dicts/cn_en.dict.yaml 可以删除或修改,里面是写死了的全拼+英文编码。
|
2022-11-26 21:42:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 方案说明
|
|
|
|
|
schema:
|
2022-11-29 04:15:58 +01:00
|
|
|
|
schema_id: double_pinyin
|
|
|
|
|
name: 自然码双拼
|
2022-11-26 21:42:11 +01:00
|
|
|
|
version: "1"
|
|
|
|
|
author:
|
|
|
|
|
- Dvel
|
|
|
|
|
description: |
|
2022-11-29 04:15:58 +01:00
|
|
|
|
雾凇拼音 - 自然码双拼
|
2022-11-26 21:42:11 +01:00
|
|
|
|
https://github.com/iDvel/rime-ice
|
|
|
|
|
dependencies:
|
2022-11-29 04:15:58 +01:00
|
|
|
|
- melt_eng # 英文输入,作为次翻译器挂载到拼音方案
|
2023-01-03 05:46:18 +01:00
|
|
|
|
- liangfen # 两分拼字,作为反查挂载到拼音方案
|
2022-11-26 21:42:11 +01:00
|
|
|
|
|
|
|
|
|
|
2022-12-02 07:14:59 +01:00
|
|
|
|
# 开关
|
2023-02-27 10:18:06 +01:00
|
|
|
|
# 鼠须管 0.16 后,快捷键切换时的提示由 states 自定义。
|
2022-11-26 21:42:11 +01:00
|
|
|
|
switches:
|
|
|
|
|
- name: ascii_mode
|
2023-02-02 12:30:46 +01:00
|
|
|
|
states: [ 中, A ]
|
2022-11-26 21:42:11 +01:00
|
|
|
|
reset: 0
|
|
|
|
|
- name: full_shape
|
2023-04-05 18:04:21 +02:00
|
|
|
|
# states: [ 半角, 全角 ]
|
2022-11-26 21:42:11 +01:00
|
|
|
|
reset: 0
|
|
|
|
|
- name: ascii_punct
|
2023-02-08 19:06:20 +01:00
|
|
|
|
states: [ 。,, ., ] # 中英标点
|
2022-11-26 21:42:11 +01:00
|
|
|
|
reset: 0
|
|
|
|
|
- name: traditionalization
|
2023-02-02 12:30:46 +01:00
|
|
|
|
states: [ 简, 繁 ]
|
2022-11-26 21:42:11 +01:00
|
|
|
|
reset: 0
|
|
|
|
|
- name: emoji
|
|
|
|
|
states: [ 💀, 😄 ]
|
|
|
|
|
reset: 1
|
|
|
|
|
|
|
|
|
|
|
2023-02-08 19:06:20 +01:00
|
|
|
|
# 输入引擎
|
2022-11-26 21:42:11 +01:00
|
|
|
|
engine:
|
|
|
|
|
processors:
|
|
|
|
|
- lua_processor@select_character # 以词定字
|
|
|
|
|
- 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
|
2022-11-29 04:15:58 +01:00
|
|
|
|
- lua_translator@date_translator # 时间、日期、星期
|
|
|
|
|
- table_translator@custom_phrase # 自定义短语
|
|
|
|
|
- table_translator@melt_eng # 英文输入
|
|
|
|
|
- reverse_lookup_translator@liangfen # 反查,两分拼字
|
2023-01-03 05:46:18 +01:00
|
|
|
|
- lua_translator@unicode # Unicode
|
2022-11-26 21:42:11 +01:00
|
|
|
|
filters:
|
2023-04-05 18:04:21 +02:00
|
|
|
|
- simplifier@emoji # Emoji
|
|
|
|
|
- simplifier@traditionalize # 简繁切换
|
|
|
|
|
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
|
|
|
|
|
- uniquifier # 去重
|
2022-11-26 21:42:11 +01:00
|
|
|
|
|
|
|
|
|
|
2023-02-10 16:06:02 +01:00
|
|
|
|
# Lua 配置: 日期、时间、星期、ISO 8601、时间戳的触发关键字
|
2022-11-29 11:23:53 +01:00
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
2023-04-05 18:04:21 +02:00
|
|
|
|
# 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]
|
|
|
|
|
|
|
|
|
|
|
2022-11-26 21:42:11 +01:00
|
|
|
|
# 从 default 继承快捷键
|
|
|
|
|
key_binder:
|
|
|
|
|
import_preset: default
|
|
|
|
|
# bindings: # 也可以增加方案专属的快捷键
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Emoji
|
|
|
|
|
emoji:
|
|
|
|
|
opencc_config: emoji.json
|
|
|
|
|
option_name: emoji
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 简繁切换
|
|
|
|
|
traditionalize:
|
|
|
|
|
option_name: traditionalization
|
2022-12-02 07:14:59 +01:00
|
|
|
|
opencc_config: s2t.json # s2t.json | s2hk.json | s2tw.json | s2twp.json
|
2022-11-26 21:42:11 +01:00
|
|
|
|
tips: all # 转换提示: all 都显示 | char 仅单字显示 | none 不显示。
|
2022-12-02 07:14:59 +01:00
|
|
|
|
excluded_types: [ reverse_lookup ] # 不转换反查的内容
|
2022-11-26 21:42:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 自定义短语
|
|
|
|
|
custom_phrase:
|
|
|
|
|
dictionary: ""
|
2022-11-29 04:15:58 +01:00
|
|
|
|
user_dict: custom_phrase_double # 需要手动创建 custom_phrase_double.txt 文件
|
2022-11-26 21:42:11 +01:00
|
|
|
|
db_class: stabledb
|
|
|
|
|
enable_completion: false # 补全提示
|
|
|
|
|
enable_sentence: false # 禁止造句
|
2022-11-29 04:15:58 +01:00
|
|
|
|
initial_quality: 99 # custom_phrase 的权重应该比 pinyin 和 melt_eng 大
|
2022-11-26 21:42:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 引入八股文
|
|
|
|
|
grammar:
|
|
|
|
|
language: zh-hans-t-essay-bgw
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 拼音
|
|
|
|
|
translator:
|
2022-11-29 04:15:58 +01:00
|
|
|
|
dictionary: rime_ice # 挂载词库 rime_ice.dict.yaml
|
|
|
|
|
prism: double_pinyin # 多方案共用一个词库时,为避免冲突,需要用 prism 指定一个名字。
|
2022-11-26 21:42:11 +01:00
|
|
|
|
contextual_suggestions: true # 开启八股文
|
2022-11-29 04:15:58 +01:00
|
|
|
|
initial_quality: 1.2 # 拼音的权重应该比英文大
|
|
|
|
|
preedit_format: # preedit_format 影响到输入框的显示和“Shift+回车”上屏的字符
|
2022-11-26 21:42:11 +01:00
|
|
|
|
- xform/([bpmnljqxy])n/$1in/
|
|
|
|
|
- xform/(\w)g/$1eng/
|
|
|
|
|
- xform/(\w)q/$1iu/
|
|
|
|
|
- xform/([gkhvuirzcs])w/$1ua/
|
|
|
|
|
- xform/(\w)w/$1ia/
|
|
|
|
|
- xform/([dtnlgkhjqxyvuirzcs])r/$1uan/
|
|
|
|
|
- xform/(\w)t/$1ve/
|
|
|
|
|
- xform/([gkhvuirzcs])y/$1uai/
|
|
|
|
|
- xform/(\w)y/$1ing/
|
|
|
|
|
- xform/([dtnlgkhvuirzcs])o/$1uo/
|
|
|
|
|
- xform/(\w)p/$1un/
|
|
|
|
|
- xform/([jqx])s/$1iong/
|
|
|
|
|
- xform/(\w)s/$1ong/
|
|
|
|
|
- xform/([jqxnl])d/$1iang/
|
|
|
|
|
- xform/(\w)d/$1uang/
|
|
|
|
|
- xform/(\w)f/$1en/
|
|
|
|
|
- xform/(\w)h/$1ang/
|
|
|
|
|
- xform/(\w)j/$1an/
|
|
|
|
|
- xform/(\w)k/$1ao/
|
|
|
|
|
- xform/(\w)l/$1ai/
|
|
|
|
|
- xform/(\w)z/$1ei/
|
|
|
|
|
- xform/(\w)x/$1ie/
|
|
|
|
|
- xform/(\w)c/$1iao/
|
|
|
|
|
- xform/([dtgkhvuirzcs])v/$1ui/
|
|
|
|
|
- xform/(\w)b/$1ou/
|
|
|
|
|
- xform/(\w)m/$1ian/
|
|
|
|
|
- xform/([aoe])\1(\w)/$1$2/
|
|
|
|
|
- "xform/(^|[ '])v/$1zh/"
|
|
|
|
|
- "xform/(^|[ '])i/$1ch/"
|
|
|
|
|
- "xform/(^|[ '])u/$1sh/"
|
|
|
|
|
- xform/([jqxy])v/$1u/
|
|
|
|
|
- xform/([nl])v/$1ü/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 英文
|
|
|
|
|
melt_eng:
|
2023-02-26 03:11:17 +01:00
|
|
|
|
dictionary: melt_eng # 挂载词库 melt_eng.dict.yaml
|
|
|
|
|
enable_sentence: false # 禁止造句
|
|
|
|
|
enable_user_dict: false # 禁用用户词典
|
|
|
|
|
initial_quality: 1.1 # 初始权重
|
2023-02-27 10:18:06 +01:00
|
|
|
|
comment_format: # 自定义提示码
|
|
|
|
|
- xform/.*// # 清空提示码
|
2022-11-26 21:42:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 标点符号
|
2022-12-02 07:14:59 +01:00
|
|
|
|
# 共享目录预设的 punctuation.yaml 包含了 full_shape half_shape (全角和半角的符号映射)
|
|
|
|
|
# 共享目录预设的 symbols.yaml 包含了 full_shape half_shape symbols
|
2023-04-05 18:04:21 +02:00
|
|
|
|
# symbols 的功能是支持以「/」前缀开头输出一系列字符,自定义的 symbols_custom_double.yaml 修改成了「v」开头。
|
2022-11-26 21:42:11 +01:00
|
|
|
|
punctuator:
|
2023-04-05 18:04:21 +02:00
|
|
|
|
# __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
|
2022-11-26 21:42:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 处理符合特定规则的输入码,如网址、反查
|
|
|
|
|
recognizer:
|
|
|
|
|
patterns:
|
|
|
|
|
email: "^[A-Za-z][-_.0-9A-Za-z]*@.*$" # 自带的,e-mail 正则
|
|
|
|
|
# uppercase: "[A-Z][-_+.'0-9A-Za-z]*$" # 自带的,大写字母开头后,可以输入[-_+.'0-9A-Za-z]这些字符
|
|
|
|
|
url: "^(www[.]|https?:|ftp[.:]|mailto:|file:).*$|^[a-z]+[.].+$" # 自带的,URL 正则
|
2023-02-27 10:18:06 +01:00
|
|
|
|
url_2: "^[A-Za-z]+[.].*" # 支持 google.com abc.txt 等网址或文件名,会导致句号不会让句子上屏,或使用句号翻页时需要注释掉
|
|
|
|
|
win_path: "^[A-Za-z]:.*" # 支持 c:\file\path 之类的路径输入
|
|
|
|
|
colon: "^[A-Za-z]+:.*" # 上面的超集,可以输入冒号,不会导致句子直接上屏
|
|
|
|
|
underscore: "^[A-Za-z]+_.*" # 可以输入下划线 _ ,不会导致句子直接上屏
|
2023-04-05 18:04:21 +02:00
|
|
|
|
punct: "^V([0-9]|10|[A-Za-z]+)$" # 响应 symbols_custom_double.yaml 下的 symbols,用「V」替换「/」并支持大写
|
2023-02-27 10:18:06 +01:00
|
|
|
|
reverse_lookup: '^L[a-z]+$' # 响应两分的反查
|
|
|
|
|
unicode: "^U[a-f0-9]+" # 响应 Unicode
|
2023-01-03 05:46:18 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 反查:两分(拼字)
|
2023-01-04 10:16:16 +01:00
|
|
|
|
liangfen:
|
|
|
|
|
dictionary: liangfen
|
|
|
|
|
prefix: 'L' # 以 L 开头来反查
|
|
|
|
|
enable_completion: true # 补全提示
|
|
|
|
|
# tips: 〔两分〕 # 反查时显示的文字,建议注释掉,否则很多 L 开头的英文单词也会显示这个
|
2022-11-26 21:42:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 拼写设定
|
|
|
|
|
speller:
|
|
|
|
|
# 如果不想让什么标点直接上屏,可以加在 alphabet,或者编辑标点符号为两个及以上的映射
|
|
|
|
|
alphabet: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
|
2022-12-02 07:14:59 +01:00
|
|
|
|
delimiter: " '" # 第一位<空格>是拼音之间的分隔符;第二位<'>表示可以手动输入单引号来分割拼音。
|
2022-11-26 21:42:11 +01:00
|
|
|
|
algebra:
|
2023-04-06 07:04:55 +02:00
|
|
|
|
- abbrev/^(.).+$/$1/
|
2022-11-26 21:42:11 +01:00
|
|
|
|
- erase/^xx$/
|
|
|
|
|
- derive/^([jqxy])u$/$1v/
|
|
|
|
|
- derive/^([aoe])([ioun])$/$1$1$2/
|
|
|
|
|
- xform/^([aoe])(ng)?$/$1$1$2/
|
|
|
|
|
- xform/iu$/Q/
|
|
|
|
|
- xform/[iu]a$/W/
|
|
|
|
|
- xform/[uv]an$/R/
|
|
|
|
|
- xform/[uv]e$/T/
|
|
|
|
|
- xform/ing$|uai$/Y/
|
|
|
|
|
- xform/^sh/U/
|
|
|
|
|
- xform/^ch/I/
|
|
|
|
|
- xform/^zh/V/
|
|
|
|
|
- xform/uo$/O/
|
|
|
|
|
- xform/[uv]n$/P/
|
|
|
|
|
- xform/i?ong$/S/
|
|
|
|
|
- xform/[iu]ang$/D/
|
|
|
|
|
- xform/(.)en$/$1F/
|
|
|
|
|
- xform/(.)eng$/$1G/
|
|
|
|
|
- xform/(.)ang$/$1H/
|
|
|
|
|
- xform/ian$/M/
|
|
|
|
|
- xform/(.)an$/$1J/
|
|
|
|
|
- xform/iao$/C/
|
|
|
|
|
- xform/(.)ao$/$1K/
|
|
|
|
|
- xform/(.)ai$/$1L/
|
|
|
|
|
- xform/(.)ei$/$1Z/
|
|
|
|
|
- xform/ie$/X/
|
|
|
|
|
- xform/ui$/V/
|
|
|
|
|
- xform/(.)ou$/$1B/
|
|
|
|
|
- xform/in$/N/
|
|
|
|
|
- xlit/QWRTYUIOPSDFGHMJCKLZXVBN/qwrtyuiopsdfghmjcklzxvbn/
|
2023-02-28 06:40:14 +01:00
|
|
|
|
# 可输入大写字母。因为上面的双拼拼写规则用掉了大写字母。做了 xlit 转写,同时适配全拼和双拼。
|
|
|
|
|
- xlit/āḃçďēḟḡĥīĵḱĺḿńōṕɋŕśťūṽẃẋȳź/ABCDEFGHIJKLMNOPQRSTUVWXYZ/
|