|
|
@@ -1,22 +1,16 @@
|
|
|
patch:
|
|
|
# ----------------------------------------
|
|
|
- # 1. 引擎与组件加载 (Lua 脚本)
|
|
|
+ # 6. 杂项设定 (Filters & Patterns)
|
|
|
# ----------------------------------------
|
|
|
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
|
|
|
|
|
|
@@ -38,7 +32,7 @@ patch:
|
|
|
- name: search_single_char
|
|
|
abbrev: [词, 单]
|
|
|
states: [正常, 单字]
|
|
|
-
|
|
|
+
|
|
|
# ----------------------------------------
|
|
|
# 3. 中英文运算
|
|
|
# ----------------------------------------
|
|
|
@@ -47,29 +41,7 @@ patch:
|
|
|
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
|
|
|
- ]
|
|
|
-
|
|
|
+ words: [bus, key, yes]
|
|
|
|
|
|
# ----------------------------------------
|
|
|
# 3. 拼写运算 (Speller/Algebra)
|
|
|
@@ -78,25 +50,25 @@ patch:
|
|
|
# --- 自定义简拼 ---
|
|
|
# 让 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/^([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/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$/
|
|
|
@@ -107,13 +79,13 @@ patch:
|
|
|
# 声母简拼优化 (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/
|
|
|
@@ -151,4 +123,4 @@ patch:
|
|
|
- derive/([rtsdghkzc])o(u|ng)$/$1o/
|
|
|
- derive/(.+)ong$/$1on/
|
|
|
- derive/([tl])eng$/$1en/
|
|
|
- - derive/([qwrtypsdfghjklzxcbnm])([aeio])ng$/$1ng/
|
|
|
+ - derive/([qwrtypsdfghjklzxcbnm])([aeio])ng$/$1ng/
|