-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkunyomi.schema.yaml
204 lines (193 loc) · 4.19 KB
/
kunyomi.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
# Rime schema
# encoding: utf-8
schema:
schema_id: kunyomi
name: 訓読み
version: "2020.07.09"
author:
- sgalal <sgalal.me@outlook.com>
dependencies:
- luna_pinyin
description: |-
The kunyomi input method for rime.
switches:
- name: ascii_mode
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- options: [ noop, simplification, simp_jp ]
states: [ 漢體, 汉体, 和体 ]
reset: 2
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- affix_segmentor@luna_pinyin
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- echo_translator
- punct_translator
- script_translator
- script_translator@luna_pinyin
filters:
- simplifier
- simplifier@simp_jp
- uniquifier
- reverse_lookup_filter
speller:
alphabet: abcdefghijklmnopqrstuvwxyz
delimiter: " '"
algebra:
- derive/^([^&]+)&.+$/$1/
- xform/&//
# basic transformation
- xform/あ|ア/a/
- xform/い|イ/i/
- xform/う|ウ/u/
- xform/え|エ/e/
- xform/お|オ/o/
- xform/か|カ/ka/
- xform/き|キ/ki/
- xform/く|ク/ku/
- xform/け|ケ/ke/
- xform/こ|コ/ko/
- xform/さ|サ/sa/
- xform/し|シ/si/
- xform/す|ス/su/
- xform/せ|セ/se/
- xform/そ|ソ/so/
- xform/た|タ/ta/
- xform/ち|チ/ti/
- xform/つ|ツ/tu/
- xform/て|テ/te/
- xform/と|ト/to/
- xform/な|ナ/na/
- xform/に|ニ/ni/
- xform/ぬ|ヌ/nu/
- xform/ね|ネ/ne/
- xform/の|ノ/no/
- xform/は|ハ/ha/
- xform/ひ|ヒ/hi/
- xform/ふ|フ/hu/
- xform/へ|ヘ/he/
- xform/ほ|ホ/ho/
- xform/ま|マ/ma/
- xform/み|ミ/mi/
- xform/む|ム/mu/
- xform/め|メ/me/
- xform/も|モ/mo/
- xform/や|ヤ/ya/
- xform/ゆ|ユ/yu/
- xform/よ|ヨ/yo/
- xform/ら|ラ/ra/
- xform/り|リ/ri/
- xform/る|ル/ru/
- xform/れ|レ/re/
- xform/ろ|ロ/ro/
- xform/わ|ワ/wa/
- xform/ゐ|ヰ/wi/
- xform/ゑ|ヱ/we/
- xform/を|ヲ/wo/
- xform/ぱ|パ/pa/
- xform/ぴ|ピ/pi/
- xform/ぷ|プ/pu/
- xform/ぺ|ペ/pe/
- xform/ぽ|ポ/po/
- xform/が|ガ/ga/
- xform/ぎ|ギ/gi/
- xform/ぐ|グ/gu/
- xform/げ|ゲ/ge/
- xform/ご|ゴ/go/
- xform/ざ|ザ/za/
- xform/じ|ジ/zi/
- xform/ず|ズ/zu/
- xform/ぜ|ゼ/ze/
- xform/ぞ|ゾ/zo/
- xform/だ|ダ/da/
- xform/ぢ|ヂ/di/
- xform/づ|ヅ/du/
- xform/で|デ/de/
- xform/ど|ド/do/
- xform/ば|バ/ba/
- xform/び|ビ/bi/
- xform/ぶ|ブ/bu/
- xform/べ|ベ/be/
- xform/ぼ|ボ/bo/
- xform/i(ゃ|ャ)/ya/
- xform/i(ゅ|ュ)/yu/
- xform/i(ょ|ョ)/yo/
- xform/hu(ぃ|ィ)/fi/
- xform/ぁ|ァ/xa/
- xform/ぃ|ィ/xi/
- xform/ぅ|ゥ/xu/
- xform/ぇ|ェ/xe/
- xform/ぉ|ォ/xo/
# Fuzzy spelling
- derive/^r/l/
- derive/^zi/ji/
- derive/^hu/fu/
- derive/^k/c/
- derive/^g/q/
- derive/zi/dzi/
- derive/zu/dzu/
- derive/di/dzi/
- derive/du/dzu/
- derive/si/shi/
- derive/ti/chi/
- derive/ti/tsi/
- derive/tu/tsu/
# Transformation 2
- derive/wi/i/
- derive/we/e/
- derive/wo/o/
- xform/ん|ン/n/
- xform/っ|ッ/Q/
- xform/Q(.)/$1$1/
- xform/(.)ー/$1$1/
# Simplify spelling by the first
- abbrev/^([a-z]).+$/$1/
# 連用形
#- "derive/u$/i/"
translator:
dictionary: kunyomi
spelling_hints: 20
comment_format:
- xform/&//
luna_pinyin:
tag: luna_pinyin
dictionary: luna_pinyin
prefix: "`"
suffix: ";"
tips: 〔拼音〕
preedit_format:
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
reverse_lookup:
tags: [ luna_pinyin ]
overwrite_comment: false
dictionary: kunyomi
comment_format:
- xform/&/-/
simp_jp:
option_name: simp_jp
opencc_config: t2jp.json
punctuator:
import_preset: default
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
luna_pinyin: "^`[a-z']*;?$"