-
Notifications
You must be signed in to change notification settings - Fork 23
/
japanese.schema.yaml
444 lines (424 loc) · 10.7 KB
/
japanese.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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
# Rime schema
# vim: set sw=2 sts=2 et:
# encoding: utf-8
schema:
schema_id: japanese
name: 日本語
version: 'v0.2'
author:
- ensigma96 <[email protected]>
dependencies:
- terra_pinyin.extended # for using reverse lookup
- stroke
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: simplification
states: [ 漢字, 汉字 ]
reset: 0
#- options: [jp_variants, zh_simp, zh_tw ]
#- options: [zh_simp, zh_tw ]
# reset: 0
# states:
# #- 字形 → 日本
# - 字形 → 大陸
# - 字形 → 台灣
- name: ascii_punct
states: [ 。,, ., ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- affix_segmentor@putonghua_to_kanji_lookup
- affix_segmentor@hannom_lookup
- affix_segmentor@hanja_lookup
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- script_translator
- reverse_lookup_translator
- script_translator@putonghua_to_kanji_lookup
- script_translator@hannom_lookup
- script_translator@hanja_lookup
filters:
- simplifier
#- simplifier@jp_variants
#- simplifier@zh_simp
#- simplifier@zh_tw
- uniquifier
- reverse_lookup_filter@putonghua_to_kanji_reverse_lookup
- reverse_lookup_filter@hannom_reverse_lookup
- reverse_lookup_filter@hanja_reverse_lookup
speller:
alphabet: 'zyxwvutsrqponmlkjihgfedcba-_'
delimiter: " '"
algebra:
- 'derive/_/x/'
- 'derive/-/q/'
# Add / remove rules the as you wish
- 'derive/i_e/ye/'
# - 'derive/fu/hu/'
translator:
dictionary: japanese
spelling_hints: 5
comment_format:
- 'xlit|q|ー|'
preedit_format:
- 'xlit|q|ー|'
putonghua_to_kanji_lookup:
tag: putonghua_to_kanji_lookup
prefix: "`" # 獨用jyutping_lookup反查在反查鍵「`」之後再鍵入〔大寫〕「J」
dictionary: terra_pinyin.extended
prism: td_pinyin_flypy
preedit_format:
- xform/([bpmfdtnljqx])n/$1iao/
- xform/(\w)g/$1eng/
- xform/(\w)q/$1iu/
- xform/(\w)w/$1ei/
- xform/([dtnlgkhjqxyvuirzcs])r/$1uan/
- xform/(\w)t/$1ve/
- xform/(\w)y/$1un/
- xform/([dtnlgkhvuirzcs])o/$1uo/
- xform/(\w)p/$1ie/
- xform/([jqx])s/$1iong/
- xform/(\w)s/$1ong/
- xform/(\w)d/$1ai/
- xform/(\w)f/$1en/
- xform/(\w)h/$1ang/
- xform/(\w)j/$1an/
- xform/([gkhvuirzcs])k/$1uai/
- xform/(\w)k/$1ing/
- xform/([jqxnl])l/$1iang/
- xform/(\w)l/$1uang/
- xform/(\w)z/$1ou/
- xform/([gkhvuirzcs])x/$1ua/
- xform/(\w)x/$1ia/
- xform/(\w)c/$1ao/
- xform/([dtgkhvuirzcs])v/$1ui/
- xform/(\w)b/$1in/
- xform/(\w)m/$1ian/
- xform/([aoe])\1(\w)/$1$2/
- "xform/(^|[ '])v/$1zh/"
- "xform/(^|[ '])i/$1ch/"
- "xform/(^|[ '])u/$1sh/"
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
- xform/eh/ê/
- 'xform ([aeiou])(ng?|r)([-;/<,>\\.]) $1$3$2'
- 'xform ([aeo])([iuo])([-;/<,>\\.]) $1$3$2'
- 'xform a[-;] ā'
- 'xform a/ á'
- 'xform a[<,] ǎ'
- 'xform a[>\\.] à'
- 'xform e[-;] ē'
- 'xform e/ é'
- 'xform e[<,] ě'
- 'xform e[>\\.] è'
- 'xform o[-;] ō'
- 'xform o/ ó'
- 'xform o[<,] ǒ'
- 'xform o[>\\.] ò'
- 'xform i[-;] ī'
- 'xform i/ í'
- 'xform i[<,] ǐ'
- 'xform i[>\\.] ì'
- 'xform u[-;] ū'
- 'xform u/ ú'
- 'xform u[<,] ǔ'
- 'xform u[>\\.] ù'
- 'xform ü[-;] ǖ'
- 'xform ü/ ǘ'
- 'xform ü[<,] ǚ'
- 'xform ü[>\\.] ǜ'
comment_format:
- xform ([aeiou])(ng?|r)([1234]) $1$3$2
- xform ([aeo])([iuo])([1234]) $1$3$2
- xform a1 ā
- xform a2 á
- xform a3 ǎ
- xform a4 à
- xform e1 ē
- xform e2 é
- xform e3 ě
- xform e4 è
- xform o1 ō
- xform o2 ó
- xform o3 ǒ
- xform o4 ò
- xform i1 ī
- xform i2 í
- xform i3 ǐ
- xform i4 ì
- xform u1 ū
- xform u2 ú
- xform u3 ǔ
- xform u4 ù
- xform v1 ǖ
- xform v2 ǘ
- xform v3 ǚ
- xform v4 ǜ
- xform/([nljqxy])v/$1ü/
- xform/eh[0-5]?/ê/
- xform/([a-z]+)[0-5]/$1/
tips: 【普查日】
#closing_tips: 【粵拼】
putonghua_to_kanji_reverse_lookup:
tags: [ putonghua_to_kanji_lookup ]
dictionary: japanese
spelling_hints: 10
comment_format:
- 'xlit|q|ー|'
preedit_format:
- 'xlit|q|ー|'
# simplifier:
# option_name: jp_variants
# opencc_config: jp_t2s.json
reverse_lookup:
dictionary: stroke
enable_completion: true
prefix: "`H"
suffix: "`"
tips: 〔筆畫〕
preedit_format:
- xlit/hspnz/一丨丿丶乙/
comment_format:
- 'xlit|q|ー|'
hannom_lookup:
tag: hannom_lookup
prefix: "`V" # 獨用jyutping_lookup反查在反查鍵「`」之後再鍵入〔大寫〕「J」
suffix: "`"
dictionary: hannomPS
preedit_format:
- 'xform ([aeiouâăôê])(ng|nh|ch)([sfjxr]) $1$3$2'
- 'xform ([aeiouâăôê])([iunptcmy])([sfjxr]) $1$3$2'
- 'xform ([ae])([ou])([sfjxr]) $1$3$2'
- 'xform (aw|ow|uw)([iunptcmy])([sfjxr]) $1$3$2'
- 'xform (aw|ow|uw)(ng|nh|ch)([sfjxr]) $1$3$2'
- 'xform z '
#- 'xform , '
- 'xform A '
- 'xform dd đ'
- 'xform aa â'
- 'xform âs ấ'
- 'xform âf ầ'
- 'xform âj ậ'
- 'xform âx ẫ'
- 'xform âr ẩ'
- 'xform aw ă'
- 'xform ăs ắ'
- 'xform ăf ằ'
- 'xform ăj ặ'
- 'xform ăx ẵ'
- 'xform ăr ẳ'
- 'xform oo ô'
- 'xform ôs ố'
- 'xform ôf ồ'
- 'xform ôj ộ'
- 'xform ôx ỗ'
- 'xform ôr ổ'
- 'xform ee ê'
- 'xform ês ế'
- 'xform êf ề'
- 'xform êj ệ'
- 'xform êx ễ'
- 'xform êr ể'
- 'xform uw ư'
- 'xform ưs ứ'
- 'xform ưf ừ'
- 'xform ưj ự'
- 'xform ưx ữ'
- 'xform ưr ử'
- 'xform ow ơ'
- 'xform ơs ớ'
- 'xform ơf ờ'
- 'xform ơj ợ'
- 'xform ơx ỡ'
- 'xform ơr ở'
- 'xform as á'
- 'xform af à'
- 'xform aj ạ'
- 'xform ax ã'
- 'xform ar ả'
- 'xform is í'
- 'xform if ì'
- 'xform ij ị'
- 'xform ix ĩ'
- 'xform ir ỉ'
- 'xform us ú'
- 'xform uf ù'
- 'xform uj ụ'
- 'xform ux ũ'
- 'xform ur ủ'
- 'xform es é'
- 'xform ef è'
- 'xform ej ẹ'
- 'xform ex ẽ'
- 'xform er ẻ'
- 'xform os ó'
- 'xform of ò'
- 'xform oj ọ'
- 'xform ox õ'
- 'xform or ỏ'
- 'xform ys ý'
- 'xform yf ỳ'
- 'xform yj ỵ'
- 'xform yx ỹ'
- 'xform yr ỷ'
tips: 【越】
hannom_reverse_lookup:
tags: [ hannom_lookup ]
dictionary: hannomPS
comment_format:
- 'xform ([aeiouâăôê])(ng|nh|ch)([sfjxr]) $1$3$2'
- 'xform ([aeiouâăôê])([iunptcmy])([sfjxr]) $1$3$2'
- 'xform ([ae])([ou])([sfjxr]) $1$3$2'
- 'xform (aw|ow|uw)([iunptcmy])([sfjxr]) $1$3$2'
- 'xform (aw|ow|uw)(ng|nh|ch)([sfjxr]) $1$3$2'
# - 'xform z ,【𡨸標準】'
# - 'xform , ,【𡨸異體】'
- 'xform z '
- 'xform dd đ'
- 'xform aa â'
- 'xform âs ấ'
- 'xform âf ầ'
- 'xform âj ậ'
- 'xform âx ẫ'
- 'xform âr ẩ'
- 'xform aw ă'
- 'xform ăs ắ'
- 'xform ăf ằ'
- 'xform ăj ặ'
- 'xform ăx ẵ'
- 'xform ăr ẳ'
- 'xform oo ô'
- 'xform ôs ố'
- 'xform ôf ồ'
- 'xform ôj ộ'
- 'xform ôx ỗ'
- 'xform ôr ổ'
- 'xform ee ê'
- 'xform ês ế'
- 'xform êf ề'
- 'xform êj ệ'
- 'xform êx ễ'
- 'xform êr ể'
- 'xform uw ư'
- 'xform ưs ứ'
- 'xform ưf ừ'
- 'xform ưj ự'
- 'xform ưx ữ'
- 'xform ưr ử'
- 'xform ow ơ'
- 'xform ơs ớ'
- 'xform ơf ờ'
- 'xform ơj ợ'
- 'xform ơx ỡ'
- 'xform ơr ở'
- 'xform as á'
- 'xform af à'
- 'xform aj ạ'
- 'xform ax ã'
- 'xform ar ả'
- 'xform is í'
- 'xform if ì'
- 'xform ij ị'
- 'xform ix ĩ'
- 'xform ir ỉ'
- 'xform us ú'
- 'xform uf ù'
- 'xform uj ụ'
- 'xform ux ũ'
- 'xform ur ủ'
- 'xform es é'
- 'xform ef è'
- 'xform ej ẹ'
- 'xform ex ẽ'
- 'xform er ẻ'
- 'xform os ó'
- 'xform of ò'
- 'xform oj ọ'
- 'xform ox õ'
- 'xform or ỏ'
- 'xform ys ý'
- 'xform yf ỳ'
- 'xform yj ỵ'
- 'xform yx ỹ'
- 'xform yr ỷ'
#closing_tips: 【粵拼】
hanja_lookup:
tag: hanja_lookup
prefix: "`K" # 獨用jyutping_lookup反查在反查鍵「`」之後再鍵入〔大寫〕「J」
suffix: "`"
dictionary: "hangyl"
preedit_format:
- xform/'/ /
- xform/(^|[ '])([qx])/$1/
- xform/([qx])/ng/
tips: 【韓】
hanja_reverse_lookup:
tags: [ hanja_lookup ]
dictionary: "hangyl"
comment_format:
- xform/(^|[ '])q/$1/
- xform/q/ng/
punctuator:
import_preset: default
key_binder:
bindings:
- {accept: "Control+Shift+1", select: .next, when: always}
- {accept: "Control+Shift+n", select: japanese, when: always}
- {accept: "Control+Shift+N", select: japanese, when: always}
- {accept: "Control+Shift+k", select: korean, when: always}
- {accept: "Control+Shift+K", select: korean, when: always}
- {accept: "Control+Shift+v", select: vietnamese, when: always}
- {accept: "Control+Shift+V", select: vietnamese, when: always}
- {accept: "Control+Shift+j", select: double_jyutping_extra, when: always}
- {accept: "Control+Shift+J", select: double_jyutping_extra, when: always}
- {accept: "Control+Shift+m", select: td_pinyin_flypy_extra, when: always}
- {accept: "Control+Shift+M", select: td_pinyin_flypy_extra, when: always}
- {accept: "Control+Shift+l", select: international, when: always}
- {accept: "Control+Shift+L", select: international, when: always}
- {accept: "F16", select: .next, when: always}
- {accept: "F19", select: international, when: always}
# [] Pagination
- {accept: bracketleft, send: Page_Up , when: has_menu}
- {accept: bracketright, send: Page_Down , when: has_menu}
recognizer:
import_preset: default
patterns:
reverse_lookup: "`H[a-z]*`?$"
putonghua_to_kanji_lookup: "`[a-z;/,.]*`?$"
hannom_lookup: "`V[a-z]*?$"
hanja_lookup: "`K[a-z]*?$"
#zh_jp:
# option_name: zh_jp
# opencc_config: jp_t2s.json
# #tips: all
# tips: none
# zh_simp:
# option_name: zh_simp
# opencc_config: t2s.json
# tips: none
# zh_tw:
# option_name: zh_tw
# opencc_config: t2tw.json
# tips: none
# jp_variants:
# option_name: jp_variants
# opencc_config: jp_t2s.json
# tips: none