|
|
@@ -1,7 +1,4 @@
|
|
|
patch:
|
|
|
- # ----------------------------------------
|
|
|
- # 6. 杂项设定 (Filters & Patterns)
|
|
|
- # ----------------------------------------
|
|
|
engine/processors/+:
|
|
|
- lua_processor@*cold_word_drop.processor
|
|
|
engine/filters/+:
|
|
|
@@ -9,29 +6,18 @@ patch:
|
|
|
|
|
|
translator/dictionary: rime_frost.custom
|
|
|
translator/preedit_format/+:
|
|
|
- - xform/(?<=[A-Z])\s(?=[A-Z])//
|
|
|
-
|
|
|
+ - xform/(?<=[A-Z])\s(?=[A-Z])//
|
|
|
+
|
|
|
+ melt_eng/initial_quality: 1.1
|
|
|
recognizer/patterns/punct: "^v([0-9]|10|[A-Za-z]+)$"
|
|
|
long_word_filter/count: 3
|
|
|
|
|
|
- # ----------------------------------------
|
|
|
- # 3. 中英文运算
|
|
|
- # ----------------------------------------
|
|
|
- melt_eng/initial_quality: 1.1
|
|
|
- reduce_english_filter:
|
|
|
- mode: custom
|
|
|
- idx: 3
|
|
|
- words: [bus, key, yes]
|
|
|
-
|
|
|
- # ----------------------------------------
|
|
|
- # 4. 方案切换开关 (Switches)
|
|
|
- # ----------------------------------------
|
|
|
switches:
|
|
|
- name: ascii_mode
|
|
|
states: [中, 英]
|
|
|
- name: ascii_punct
|
|
|
states: ["中标", "英标"]
|
|
|
- # reset: 1 # 默认英标 (如需开启请取消注释)
|
|
|
+ # reset: 1 # 默认英标
|
|
|
- name: traditionalization
|
|
|
states: [简, 繁]
|
|
|
- name: emoji
|
|
|
@@ -42,51 +28,64 @@ patch:
|
|
|
abbrev: [词, 单]
|
|
|
states: [正常, 单字]
|
|
|
|
|
|
- # ----------------------------------------
|
|
|
- # 3. 拼写运算 (Speller/Algebra)
|
|
|
- # ----------------------------------------
|
|
|
+ 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
|
|
|
+ ]
|
|
|
+
|
|
|
speller/algebra:
|
|
|
- # --- 自定义简拼 ---
|
|
|
- # 让 bei 都能由 be 打出来 (杯/北/被)
|
|
|
+ #-----------------------------------
|
|
|
+ # 让 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
|
|
|
-
|
|
|
- # --- 超级简拼与修正 ---
|
|
|
+ #-----------------------------------
|
|
|
+ - derive/^([zcs])h/$1/
|
|
|
+ - derive/^([zcs])([^h])/$1h$2/
|
|
|
+ - derive/ang$/an/
|
|
|
+ - derive/an$/ang/
|
|
|
+ - derive/eng$/en/
|
|
|
+ - derive/en$/eng/
|
|
|
+ - derive/in$/ing/
|
|
|
+ - derive/ing$/in/
|
|
|
+ - derive/ian$/iang/
|
|
|
+ - derive/iang$/ian/
|
|
|
+ - derive/uan$/uang/
|
|
|
+ - derive/uang$/uan/
|
|
|
+ - derive/ong$/on/
|
|
|
+ - derive/on$/ong/
|
|
|
+ #-----------------------------------
|
|
|
- erase/^hm$/
|
|
|
- erase/^m$/
|
|
|
- erase/^n$/
|
|
|
- erase/^ng$/
|
|
|
- # 首字母简拼
|
|
|
+ # shih -> 时候
|
|
|
- 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/
|