forked from LEOYoon-Tsaw/Cangjie6
-
Notifications
You must be signed in to change notification settings - Fork 0
/
My_cangjie6.schema.yaml
364 lines (329 loc) · 12.3 KB
/
My_cangjie6.schema.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# Rime schema
# encoding: utf-8
schema:
schema_id: cangjie6
name: 蒼頡檢字法
author:
- 朱邦復先生
- 沈紅蓮女士
description: |
第六代倉頡輸入法
碼表由雪齋、惜緣和crazy4u整理
version: 0.19
dependencies: [ luna_pinyin, jyutping, zyenpheng, emoji ]
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
reset: 0
states: [ 半角, 全角 ]
- name: simplification
reset: 0
states: [ 漢字, 簡字 ]
- name: emoji_segestion
reset: 1
states: [ "🈚️️\uFE0E", 🈶️️ ]
- name: extended_charset
reset: 0
states: [ 通用, 增廣 ]
- name: ascii_punct
reset: 0
states: [ 句讀, 標點 ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- affix_segmentor@pinyin
- affix_segmentor@jyutping
- affix_segmentor@pinyin_lookup
- affix_segmentor@jyutping_lookup
- affix_segmentor@reverse_lookup
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- script_translator
- table_translator@custom_phrase
- script_translator@pinyin
- script_translator@jyutping
- script_translator@pinyin_lookup
- script_translator@jyutping_lookup
filters:
- simplifier@zh_simp
- simplifier@emoji_switch
- uniquifier
- charset_filter@cjk_filter
- reverse_lookup_filter@middle_chinese
- reverse_lookup_filter@pinyin_reverse_lookup
- reverse_lookup_filter@jyutping_reverse_lookup
zh_simp:
opencc_config: t2s.json
tags: [ pinyin, jyutping, abc ]
tips: char
emoji_switch:
opencc_config: emoji.json
option_name: emoji_segestion
tags: [ pinyin, jyutping, abc ]
tips: all
cjk_filter:
tags: [ abc ]
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " "
translator:
dictionary: &dict
cangjie6
enable_completion: true
enable_sentence: true
sentence_over_completion: true
soft_cursor: true
preedit_format:
- xform/^([a-z ]*)$/$1\t \U$1\E/
- xlit|ABCDEFGHIJKLMNOPQRSTUVWXYZ|日月金木水火土竹戈十大中一弓人心手口尸廿山女田止卜片|
comment_format:
- xlit|abcdefghijklmnopqrstuvwxyz~|日月金木水火土竹戈十大中一弓人心手口尸廿山女田止卜片・|
initial_quality: 0.75
custom_phrase:
dictionary: ""
user_dict: custom_phrase
db_class: tabledb
enable_sentence: false
enable_completion: false
initial_quality: 1
pinyin:
tag: pinyin
dictionary: luna_pinyin
prefix: P
suffix: ;
preedit_format: &pinyin
- xform/v/ü/
tips: 【漢拼】
closing_tips: 【蒼頡】
initial_quality: 0.2
jyutping:
tag: jyutping
dictionary: jyutping
prefix: J
suffix: ;
tips: 【粵拼】
closing_tips: 【蒼頡】
initial_quality: 0.1
abc_segmentor:
# extra_tags: [ pinyin, jyutping ]
reverse_lookup:
tag: reverse_lookup
prefix: "`"
suffix: ;
tips: 【反查】
closing_tips: 【蒼頡】
extra_tags: [ pinyin_lookup, jyutping_lookup ]
pinyin_lookup:
tag: pinyin_lookup
prefix: "`P"
suffix: ;
dictionary: luna_pinyin
preedit_format: *pinyin
tips: 【漢拼反查】
closing_tips: 【蒼頡】
initial_quality: 1
jyutping_lookup:
tag: jyutping_lookup
prefix: "`J"
suffix: ;
dictionary: jyutping
tips: 【粵拼反查】
closing_tips: 【蒼頡】
initial_quality: 0.6
pinyin_reverse_lookup:
tags: [ pinyin_lookup ]
overwrite_comment: true
dictionary: *dict
comment_format: &comment
- xform/$/〕/
- xform/^/〔/
- xlit|abcdefghijklmnopqrstuvwxyz |日月金木水火土竹戈十大中一弓人心手口尸廿山女田止卜片、|
jyutping_reverse_lookup:
tags: [ jyutping_lookup ]
overwrite_comment: true
dictionary: *dict
comment_format: *comment
middle_chinese:
tags: [ pinyin, jyutping, abc ]
dictionary: zyenpheng
overwrite_comment: true
comment_format:
- xform/ /\x03 \x01/
- xform/$/\x03/
- xform/^/\x01/
- xform/ng/ŋ/
- xform/k\x03/ŋq\x03/
- xform/t\x03/nq\x03/
- xform/p\x03/mq\x03/
- xform/(\x01(?:th?|ch?|zs?|[dns]))r(?=[^iy'])/$1r'r/
- xform/(\x01(?:ph?|kh?|gh?|[bmhqjiy]|ŋ)[iy])eŋ/$1æŋ/
- xform/j(?![iy'])/ji/
- xform/(\x01(?:ch?|zs?|[sn])?[jl])(?=([iy]e([umn]|ŋ)?|i[imn]|yn)[dxhq]?)/$1'j/
- xform/(\x01(?:ch?|zs?|s))(?=(?:[iy]e(?:[umn]|ŋ)?|i[imn]|yn)[dxhq]?)/$1'j/
- xform/(\x01(?:ch?|zs?|s)rj?i)n/$1ɿn/
- xform/(\x01)(?!ph?|kh?|gh?|ŋ|[bmhqjiy])([^aeiouy]*y)n([xhq]?\x03)/$1$2ɿn$3/
- xform/(\x01)([^aeiouy]*jy)n([xhq]?\x03)/$1$2ɿn$3/
- xform/(\x01)(?!kh?|g|ŋ)([^aeioux]*)ia([xhq]?\x03)/$1$2'ria$3/
- xform/([^xhdq])\x03/$1w\x03/
- xform/(\x01[^\x01\x03]+)([whxq])\x03((?:\s\x01[^\x01\x03]+\x03)*)\s\1([whxq])\x03((?:\s\x01[^\x01\x03]+\x03)*)\s\1([whxq]\x03)/$1$2$4$6$3$5/
- xform/(\x01[^\x01\x03]+)([whxq])\x03((?:\s\x01[^\x01\x03]+\x03)*)\s\1([whxq]\x03)/$1$2$4$3/
# - xform/\x01ph(?=y(o[in]?|a[mnd]|[au]ŋ)|iu(ŋ)?)/\x01L敷\x02/
# - xform/\x01p(?=y(o[in]?|a[mnd]|[au]ŋ)|iu(ŋ)?)/\x01L非\x02/
# - xform/\x01b(?=y(o[in]?|a[mnd]|[au]ŋ)|iu(ŋ)?)/\x01L奉\x02/
# - xform/\x01m(?=y(o[in]?|a[mnd]|[au]ŋ))/\x01L微\x02/
- xform/\x01ph/\x01L滂\x02/
- xform/\x01p/\x01L幫\x02/
- xform/\x01b/\x01L並\x02/
- xform/\x01m/\x01L明\x02/
- xform/\x01thr/\x01徹\x02/
- xform/\x01tr/\x01知\x02/
- xform/\x01dr/\x01澄\x02/
- xform/\x01nr/\x01孃\x02/
- xform/\x01nj/\x01日\x02/
- xform/\x01th/\x01透\x02/
- xform/\x01t/\x01端\x02/
- xform/\x01d/\x01定\x02/
- xform/\x01n/\x01泥\x02/
- xform/\x01chr/\x01初\x02/
- xform/\x01cr/\x01莊\x02/
- xform/\x01zsr/\x01俟\x02/
- xform/\x01zr/\x01崇\x02/
- xform/\x01sr/\x01生\x02/
- xform/\x01chj/\x01昌\x02/
- xform/\x01cj/\x01章\x02/
- xform/\x01zsj/\x01船\x02/
- xform/\x01zj/\x01常\x02/
- xform/\x01sj/\x01書\x02/
- xform/\x01ch/\x01清\x02/
- xform/\x01c/\x01精\x02/
- xform/\x01zs/\x01邪\x02/
- xform/\x01z/\x01從\x02/
- xform/\x01s/\x01心\x02/
- xform/\x01kh/\x01谿\x02/
- xform/\x01k/\x01見\x02/
- xform/\x01gh/\x01匣\x02/
- xform/\x01g/\x01羣\x02/
- xform/\x01ŋ/\x01疑\x02/
- xform/\x01h/\x01曉\x02/
- xform/\x01q/\x01影\x02/
- xform/\x01([iy])/\x01云\x02$1/
- xform/\x01j/\x01以\x02/
- xform/\x01l/\x01來\x02/
- xform/'//
- xform/\x01(L?)([^\x00-\x7f]{3})\x02([^\x01\x02\x03wxhq]+)([wxhq]*)\x03\s((?:\x01[^\x01\x03]+\x03\s)*)\x01\1([^\x00-\x7f]{3})\x02\3([wxhq]*)\x03\s((?:\x01[^\x01\x03]+\x03\s)*)\x01\1([^\x00-\x7f]{3})\x02\3([wxhq]*\x03)/\x01$1$2/$6/$9\x02$3$4/$7/$10 $5$8/
- xform/\x01(L?)([^\x00-\x7f]{3})\x02([^\x01\x02\x03wxhq]+)([wxhq]*)\x03\s((?:\x01[^\x01\x03]+\x03\s)*)\x01\1([^\x00-\x7f]{3})\x02\3([wxhq]*\x03)\s?/\x01$1$2/$6\x02$3$4/$7 $5/
- xform/\x01(L?)([^\x00-\x7f]{3})\x02([^\x01\x02\x03wxhq]+)([wxhq]*)\x03\s((?:\x01[^\x01\x03]+\x03\s)*)\x01\1([^\x00-\x7f]{3})\x02\3([wxhq]*\x03)\s?/\x01$1$2/$6\x02$3$4/$7 $5/
- xform//\x03/\x03/
- xform/([xhq]+)w/w$1/
- xform/(w?)([hq]+)x/$1x$2/
- xform/q(h)/$1q/
- xform/\x02([^\x01\x02\x03wxhq]+?)([wxhq]+)/\2/\2\x03/\x02$1$2\x03/
- xform/\x02([^\x01\x02\x03wxhq]+?)([wxhq]+)/\2\x03/\x02$1$2\x03/
- xform/\x02(i?)uŋ((?:[wxhq]|/)*\x03)/\x02$1東$2/
- xform/\x02(y)uŋ((?:[wxhq]|/)*\x03)/\x02$1鐘$2/
- xform/\x02(u)uŋ((?:[wxhq]|/)*\x03)/\x02$1冬$2/
- xform/\x02(r)uŋ((?:[wxhq]|/)*\x03)/\x02$1江$2/
- xform/\x02([iy])aŋ((?:[wxhq]|/)*\x03)/\x02$1o陽$2/
- xform/\x02(u?)aŋ((?:[wxhq]|/)*\x03)/\x02$1o唐$2/
- xform/\x02(ru?)aŋ((?:[wxhq]|/)*\x03)/\x02$1o庚$2/
- xform/\x02([iy])æŋ((?:[wxhq]|/)*\x03)/\x02ɨ$1o庚$2/
- xform/\x02(ru?)eŋ((?:[wxhq]|/)*\x03)/\x02$1o耕$2/
- xform/\x02j?([iy])eŋ((?:[wxhq]|/)*\x03)/\x02jɨ$1o清$2/
- xform/\x02(u?e)ŋ((?:[wxhq]|/)*\x03)/\x02$1o青$2/
- xform/\x02([iy])ŋ((?:[wxhq]|/)*\x03)/\x02$1o蒸$2/
- xform/\x02(u?)oŋ((?:[wxhq]|/)*\x03)/\x02$1o登$2/
- xform/\x02(j?)(y)ɿn((?:[wxhq]|/)*\x03)/\x02$1ɨ$2o諄$3/
- xform/\x02(j?)(i)ɿn((?:[wxhq]|/)*\x03)/\x02$1ɨ$2o臻$3/
- xform/\x02(j?)([iy])n((?:[wxhq]|/)*\x03)/\x02$1ɨ$2o眞$3/
- xform/\x02(i)on((?:[wxhq]|/)*\x03)/\x02$1o欣$2/
- xform/\x02(u)on((?:[wxhq]|/)*\x03)/\x02$1o魂$2/
- xform/\x02on((?:[wxhq]|/)*\x03)/\x02o痕$1/
- xform/\x02(y)on((?:[wxhq]|/)*\x03)/\x02$1o文$2/
- xform/\x02(u)an((?:[wxhq]|/)*\x03)/\x02$1o桓$2/
- xform/\x02([iy])an((?:[wxhq]|/)*\x03)/\x02$1o元$2/
- xform/\x02(ru?)an((?:[wxhq]|/)*\x03)/\x02$1o刪$2/
- xform/\x02an((?:[wxhq]|/)*\x03)/\x02o寒$1/
- xform/\x02(ru?)en((?:[wxhq]|/)*\x03)/\x02$1o山$2/
- xform/\x02(j?)([iy])en((?:[wxhq]|/)*\x03)/\x02$1ɨ$2o仙$3/
- xform/\x02(u?e)n((?:[wxhq]|/)*\x03)/\x02$1o先$2/
- xform/\x02(j?)(i)m((?:[wxhq]|/)*\x03)/\x02$1ɨ$2o侵$3/
- xform/\x02(i)am((?:[wxhq]|/)*\x03)/\x02$1o嚴$2/
- xform/\x02(y)am((?:[wxhq]|/)*\x03)/\x02$1o凡$2/
- xform/\x02(r)am((?:[wxhq]|/)*\x03)/\x02$1o銜$2/
- xform/\x02(r)em((?:[wxhq]|/)*\x03)/\x02$1o咸$2/
- xform/\x02am((?:[wxhq]|/)*\x03)/\x02o談$1/
- xform/\x02(j?)(i)em((?:[wxhq]|/)*\x03)/\x02$1ɨ$2o鹽$3/
- xform/\x02(e)m((?:[wxhq]|/)*\x03)/\x02$1o添$2/
- xform/\x02om((?:[wxhq]|/)*\x03)/\x02o覃$1/
- xform/\x02(r)au((?:[wxh]|/)*\x03)/\x02$1肴$2/
- xform/\x02au((?:[wxh]|/)*\x03)/\x02豪$1/
- xform/\x02(j?)(i)eu((?:[wxh]|/)*\x03)/\x02$1ɨ$2宵$3/
- xform/\x02(e)u((?:[wxh]|/)*\x03)/\x02$1蕭$2/
- xform/\x02(i)u((?:[wxh]|/)*\x03)/\x02$1尤$2/
- xform/\x02u((?:[wxh]|/)*\x03)/\x02侯$1/
- xform/\x02(y)((?:[wxh]|/)*\x03)/\x02$1幽$2/
- xform/\x02(j?)([iy])e((?:[wxh]|/)*\x03)/\x02$1ɨ$2o支$3/
- xform/\x02(j?)([iy])i((?:[wxh]|/)*\x03)/\x02$1ɨ$2o脂$3/
- xform/\x02i((?:[wxh]|/)*\x03)/\x02io之$1/
- xform/\x02([iy])oi((?:[wxh]|/)*\x03)/\x02$1o微$2/
- xform/\x02([iy])a((?:d|/)+\x03)/\x02$1o廢$2/
- xform/\x02(ru?)a((?:d|/)+\x03)/\x02$1o夬$2/
- xform/\x02(u?)a((?:d|/)+\x03)/\x02$1o泰$2/
- xform/\x02(j?)([iy])e((?:d|/)+\x03)/\x02$1ɨ$2o祭$3/
- xform/\x02(ru?)e((?:[wxh]|/)*\x03)/\x02$1o佳$2/
- xform/\x02(ru?)ai((?:[wxh]|/)*\x03)/\x02$1o皆$2/
- xform/\x02(u?e)((?:[wxh]|/)*\x03)/\x02$1o齊$2/
- xform/\x02i?(u)ai((?:[wxh]|/)*\x03)/\x02$1o灰$2/
- xform/\x02ai((?:[wxh]|/)*\x03)/\x02o咍$1/
- xform/\x02([uiy])a((?:[wxh]|/)*\x03)/\x02$1o戈$2/
- xform/\x02a((?:[wxh]|/)*\x03)/\x02o歌$1/
- xform/\x02j?(r[ui]?)a((?:[wxh]|/)*\x03)/\x02$1o麻$2/
- xform/\x02(i)o((?:[wxh]|/)*\x03)/\x02$1魚$2/
- xform/\x02(y)o((?:[wxh]|/)*\x03)/\x02$1虞$2/
- xform/\x02o((?:[wxh]|/)*\x03)/\x02模$1/
- xform/d/h/
- xform/(\x01[^\x01\x03wxhq]+)([whxq]+)((?:/[whxq]+)*)\x03/$1】$2$3/
- xform/\x01(L?)((?:[^\x00-\x7f]{3}|/)+)\x02(j?ɨ)([iy])(o?)([^\x00-\x7f]{3})/〖$2〗重紐$3等\x01$1$5$4\x03【$6/
- xform/\x01(L?)((?:[^\x00-\x7f]{3}|/)+)\x02(u?)e(o?)([^\x00-\x7f]{3})/〖$2〗四等\x01$1$4$3\x03【$5/
- xform/\x01(L?)((?:[^\x00-\x7f]{3}|/)+)\x02r(u?)(o?)([^\x00-\x7f]{3})/〖$2〗二等\x01$1$4$3\x03【$5/
- xform/\x01(L?)((?:[^\x00-\x7f]{3}|/)+)\x02r?([iy])(o?)([^\x00-\x7f]{3})/〖$2〗三等\x01$1$4$3\x03【$5/
- xform/\x01(L?)((?:[^\x00-\x7f]{3}|/)+)\x02(u?)(o?)([^\x00-\x7f]{3})/〖$2〗一等\x01$1$4$3\x03【$5/
- xform/jɨ/四/
- xform/ɨ/三/
- xform/\x01(?!L)o[uy]\x03/合/
- xform/\x01(?!L)oi?\x03/開/
- xform/\x01L?[a-z]*\x03//
- xform/(\s|^)([^\s]+)【([^\x00-\x7f]{3})】([wxhq]+)\s((?:[^\s]+\s)*)\2【([^\x00-\x7f]{3})】([wxhq]+)(\s|$)/$1$2【$3/$6】$4/$7 $5$8/
- xform/(】)([wxhq]+)/\2(\s)/$1$2$3/
- xlit|wxhq|平上去入|
key_binder:
import_preset: default
punctuator:
import_preset: symbols_leo
recognizer:
import_preset: default
patterns:
email: ^[a-z][-_.0-9a-z]*@.*$
url: ^(www[.]|https?:|ftp[.:]|mailto:|file:).*$|^[a-z]+[.].+$
reverse_lookup: "`[a-z]*;?$"
pinyin_lookup: "`P[a-z]*;?$"
jyutping_lookup: "`J[a-z]*;?$"
pinyin: (?<![`A-Z])P[a-z']*;?$
jyutping: (?<![`A-Z])J[a-z']*;?$
punct: "^z([a-z]+|[0-9])$"
upper_case: ^([A-IK-OQ-Z][a-zA-Z0-9]*|[JP][A-Z0-9]*)$