| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- patch:
- # ----------------------------------------
- # 1. 引擎与组件加载 (Lua 脚本)
- # ----------------------------------------
- engine/processors/+:
- - lua_processor@*cold_word_drop.processor
- engine/filters/+:
- - lua_filter@*cold_word_drop.filter
- # ----------------------------------------
- # 2. 翻译器设定 (Translator)
- # ----------------------------------------
- translator/dictionary: rime_frost.custom
- translator/preedit_format/+:
- - xform/(?<=[A-Z])\s(?=[A-Z])//
- # ----------------------------------------
- # 6. 杂项设定 (Filters & Patterns)
- # ----------------------------------------
- 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: [
- aid, ann,
- bail, bait, bam, band, bans, bat, bay, bend, bent, benz, bib, bid, bien, biz, boc, bop, bos, bud, buf, bus, bach, bench, bush, bog,
- cab, cad, cain, cam, cans, cap, cef, chad, chan, chap, chef, cher, chew, chic, chin, chip, chit, coup, cum, cunt, cur, couch,
- dab, dag, dal, dam, dent, dew, dial, diet, dim, din, dip, dis, dit, doug, dub, dug, dunn, don,
- fab, fax, fob, fog, foul, fur, fend,
- gag, gail, gain, gal, gam, gaol, ged, gel, ger, guam, gus, gut,
- hail, ham, hank, hans, hat, hay, heil, heir, hem, hep, hex, hud, hum, hung, hunk, hut, hush,
- jim, jug,
- kat, key,
- lab, lad, lag, laid, lam, laos, lap, lat, lax, lay, led, leg, lex, liam, lib, lichen, lid, lied, lien, lies, linn, lip, lit, liz, lob, lug, lund, lung, lux, lash, loch, lush,
- mag, maid, mann, mar, mat, med, mel, mend, mens, ment, mil, mins, mint, mob, moc, mop, mos, mot, mud, mug, mum, mesh,
- nap, nat, nay, neil, nib, nip, noun, nous, nun, nut, nail, nash,
- 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, pinch, pouch,
- rand, rant, rent, rep, res, ret, rex, rib, rid, rig, rim, rub, rug, rum, runc, runs, ranch,
- sac, sail, sal, sam, sans, sap, saw, sax, sew, sham, shaw, shin, sig, sin, sip, sis, suit, sung, suns, sup, sur, sus, ship,
- tad, tail, taj, tar, tax, tec, ted, tel, ter, tex, tic, tied, tier, ties, tim, tin, tit, tour, tout, tum,
- wag, wand, womens, wap, wax, weir, won, went,
- yan, yen, yes,
- zach,
- my, mt, dj, as, js, cs, ak, ps, cd, cn, hk, bt, pk, ml
- ]
- # ----------------------------------------
- # 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/
|