-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathluna_pinyin_simp.custom.yaml
44 lines (39 loc) · 2.02 KB
/
luna_pinyin_simp.custom.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# luna_pinyin.custom.yaml
patch:
engine/translators:
- punct_translator
- r10n_translator
- reverse_lookup_translator
recognizer/patterns/reverse_lookup: "`[a-z]*$" #请删除$后的空格!不加一个空格貌似总是解析错误,不知道MarkDown我还有多少不知道的地方:(
schema/dependencies:
- emoji
abc_segmentor/extra_tags:
- reverse_lookup
reverse_lookup:
dictionary: emoji
enable_completion: false
prefix: "`"
tips: 〔表情〕
# 載入朙月拼音擴充詞庫
"translator/dictionary": luna_pinyin.extended
# 改寫拼寫運算,使得含西文的詞彙(位於 luna_pinyin.cn_en.dict.yaml 中)不影響簡拼功能(注意,此功能只適用於朙月拼音系列方案,不適用於各類雙拼方案)
# 本條補靪只在「小狼毫 0.9.30」、「鼠鬚管 0.9.25 」、「Rime-1.2」及更高的版本中起作用。
"speller/algebra/@before 0": xform/^([b-df-np-z])$/$1_/
# 模糊拼音
'speller/algebra':
- erase/^xx$/ # 第一行保留
# 模糊音定義先於簡拼定義,方可令簡拼支持以上模糊音
#- abbrev/^([a-z]).+$/$1/ # 簡拼(首字母)
#- abbrev/^([zcs]h).+$/$1/ # 簡拼(zh, ch, sh)
# 以下是一組容錯拼寫,《漢語拼音》方案以前者爲正
- derive/^([nl])ve$/$1ue/ # nve = nue, lve = lue
- derive/^([jqxy])u/$1v/ # ju = jv,
- derive/un$/uen/ # gun = guen,
- derive/ui$/uei/ # gui = guei,
- derive/iu$/iou/ # jiu = jiou,
# 自動糾正一些常見的按鍵錯誤
- derive/([aeiou])ng$/$1gn/ # dagn => dang
- derive/([dtngkhrzcs])o(u|ng)$/$1o/ # zho => zhong|zhou
- derive/ong$/on/ # zhonguo => zhong guo
- derive/ao$/oa/ # hoa => hao
- derive/([iu])a(o|ng?)$/a$1$2/ # tain => tian