patch: # ---------------------------------------- # 6. 杂项设定 (Filters & Patterns) # ---------------------------------------- engine/processors/+: - lua_processor@*cold_word_drop.processor engine/filters/+: - lua_filter@*cold_word_drop.filter translator/dictionary: rime_frost.custom translator/preedit_format/+: - xform/(?<=[A-Z])\s(?=[A-Z])// recognizer/patterns/punct: "^v([0-9]|10|[A-Za-z]+)$" long_word_filter/count: 3 # ---------------------------------------- # 4. 方案切换开关 (Switches) # ---------------------------------------- switches: - name: ascii_mode states: [中, 英] - name: ascii_punct states: ["中标", "英标"] # reset: 1 # 默认英标 (如需开启请取消注释) - name: traditionalization states: [简, 繁] - name: emoji states: [表情关, 表情开] - name: full_shape states: [半角, 全角] - name: search_single_char abbrev: [词, 单] states: [正常, 单字] # ---------------------------------------- # 3. 中英文运算 # ---------------------------------------- melt_eng/initial_quality: 1.1 # 降低常见英文单词的优先级,避免干扰中文输入 reduce_english_filter: mode: custom idx: 3 words: [bus, key, yes] # ---------------------------------------- # 3. 拼写运算 (Speller/Algebra) # ---------------------------------------- speller/algebra: # --- 自定义简拼 --- # 让 bei 都能由 be 打出来 (杯/北/被) - derive/^([b])ei$/$1e/ # --- 模糊音 --- # 声母模糊 - derive/^([zcs])h/$1/ # zh,ch,sh => z,c,s - derive/^([zcs])([^h])/$1h$2/ # z,c,s => zh,ch,sh # 韵母模糊 - derive/ang$/an/ # ang => an - derive/an$/ang/ # an => ang - derive/eng$/en/ # eng => en - derive/en$/eng/ # en => eng - derive/in$/ing/ # in => ing - derive/ing$/in/ # ing => in - derive/ian$/iang/ # ian => iang - derive/iang$/ian/ # iang => ian - derive/uan$/uang/ # uan => uang - derive/uang$/uan/ # uang => uan - derive/ong$/on/ # ong => on - derive/on$/ong/ # on => ong # --- 超级简拼与修正 --- - erase/^hm$/ - erase/^m$/ - erase/^n$/ - erase/^ng$/ # 首字母简拼 - abbrev/^([a-z]).+$/$1/ # 声母简拼优化 (shih -> 时候) - abbrev/^([zcs]h).+$/$1/ - abbrev/^([a-z]i).+$/$1/ # --- 容错拼写 (v/u 混用) --- - derive/^([nl])ve$/$1ue/ - derive/^([jqxy])u/$1v/ - derive/^([nl])ue$/$1ve/ - derive/^([jqxy])v/$1u/ # --- 自动纠错 (错音修正) --- # 警告:以下规则可能会对简拼产生副作用 - derive/([zcs])h(a|e|i|u|ai|ei|an|en|ou|uo|ua|un|ui|uan|uai|uang|ang|eng|ong)$/h$1$2/ - derive/([wfghk])ai$/$1ia/ - derive/([wfghkz])ei$/$1ie/ - derive/([jqx])ie$/$1ei/ - derive/([rtypsdghklzcbnm])ao$/$1oa/ - derive/([ypfm])ou$/$1uo/ - derive/([wrtypsdfghklzcbnm])ang$/$1nag/ - derive/([wrtypsdfghklzcbnm])ang$/$1agn/ - derive/([wrtpsdfghklzcbnm])eng$/$1neg/ - derive/([wrtpsdfghklzcbnm])eng$/$1egn/ - derive/([qtypdjlxbnm])ing$/$1nig/ - derive/([qtypdjlxbnm])ing$/$1ign/ - derive/([rtysdghklzcn])ong$/$1nog/ - derive/([rtysdghklzcn])ong$/$1ogn/ - derive/([qtpdjlxbnm])iao$/$1ioa/ - derive/([qtpdjlxbnm])iao$/$1oia/ - derive/([rtsghkzc])ui$/$1iu/ - derive/([qjlxnm])iu$/$1ui/ - derive/([qjlxn])iang$/$1aing/ - derive/([qjlxn])iang$/$1inag/ - derive/([g|k|h|zh|sh])ua$/$1au/ - derive/([g|h|k|zh|ch|sh])uai$/$1aui/ - derive/([qrtysdghjklzxcn])uan$/$1aun/ - derive/([nlyjqx])ue$/$1eu/ - derive/([g|h|k|zh|ch|sh])uang$/$1aung/ - derive/([g|h|k|zh|ch|sh])uang$/$1uagn/ - derive/([g|h|k|zh|ch|sh])uang$/$1unag/ - derive/([g|h|k|zh|ch|sh])uang$/$1augn/ - derive/([jqx])iong$/$1inog/ - derive/([jqx])iong$/$1oing/ - derive/([jqx])iong$/$1iogn/ - derive/([jqx])iong$/$1oign/ - derive/([rtsdghkzc])o(u|ng)$/$1o/ - derive/(.+)ong$/$1on/ - derive/([tl])eng$/$1en/ - derive/([qwrtypsdfghjklzxcbnm])([aeio])ng$/$1ng/