-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathxklb.schema.yaml
326 lines (298 loc) · 7.82 KB
/
xklb.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
# Rime schema settings
# encoding: utf-8
schema:
schema_id: xklb
name: 小鹤星笔
version: "6"
author:
- 发明人 大牛
dependencies:
switches:
- name: ascii_mode
reset: 0
- name: full_shape
reset: 0
- name: simplification
reset: 0
- name: extended_charset
reset: 0
- name: ascii_punct
reset: 0
- options: [ _keyboard_menu ]
states: [ " 选单"]
- options: [_key_']
# states: [造词]
- name: ascii_mode
# states: [ "中文", " 🆎️ " ]
reset: 0
- options: [_key_~]
states: [反查]
- options: [_Keyboard_clip]
states: [贴板]
# - options: [_keyboard_cjbj]
# states: [编辑]
- options: [_key_`]
#states: [万能]
- options: [_key_M2T]
states: [" Ⓜ "]
- options: [_key_Left]
states: [" ⇦ "]
- options: [_key_Right]
states: ["️ ⇨ "]
- options: [_key_Hide]
states: [ " ‹‹‹ "]
- name: _hide_candidate
reset: 1
- name: _hide_comment
reset: 0
- name: _hide_key_hint
reset: 0
- name: emoji_cn #Emoji开关
# reset: 0 # 1为默认开启
# states: [ "🈚️️\uFE0E", "🈶️️\uFE0F" ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- affix_segmentor@xklbWXYZ
# - affix_segmentor@xmfc
- affix_segmentor@pinyin_simp
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
# - table_translator@xklb_dz #单字置前
- table_translator
- "lua_translator@Lunar_calendar_translator"
- "lua_translator@date_translator"
- "lua_translator@number_translator"
- reverse_lookup_translator
- table_translator@b_sms
- table_translator@quanpinerfen
- table_translator@xklbWXYZ
- table_translator@xklbXX
- table_translator@xklbYY
- table_translator@xklbZZ
- table_translator@a_yhck
- history_translator@history
- script_translator@pinyin_simp
# - table_translator@xmfc
filters:
- simplifier
- simplifier@simplification
- simplifier@emoji_cn #Emoji滤镜
- uniquifier
- reverse_lookup_filter@quanpinerfen_lookup
- reverse_lookup_filter@pinyin_simp_lookup
# - reverse_lookup_filter@xmfc_lookup
speller:
alphabet: "/;abcdefghijklmnopqrstuvwxyz"
initials: ";abcdefghijklmnopqrstuvwxyz"
# alphabet: "@/;abcdefghijklmnopqrstuvwxyz"
# initials: "@;abcdefghijklmnopqrstuvwxyz"
# finals: '/'
delimiter: " '"
auto_select: true #顶字上屏
auto_select_unique_candidate: true
auto_clear: max_length #manual|auto|max_length 空码按下一键确认清屏|空码自动清|达到最长码时后码顶上清屏
algebra: #有简有全
- xform/([A-Z][0-9]?)+([A-Z][0-9]?)$/$2/
- derive/.....A|....B|...C|..D|.E|F//
- xform/.....U|.(.)...V|...W|..X|.Y|Z/$1/
- derive/[0-9]$//
- xform/[ABCDEF]$//
- derive|^;|/|
# algebra: #有简无全
# - xform/([A-Z][0-9]?)+([A-Z][0-9]?)$/$2/
# - xform/.....U|.(.)...V|...W|..X|.Y|Z|.....A|....B|...C|..D|.E|F/$1/
# - derive/[0-9]$//
# - derive|^;|/|
translator:
__include: /TS1
dictionary: xklb
initial_quality: 100
enable_charset_filter: false
enable_completion: true #逐码提示
enable_encoder: false
enable_sentence: false
enable_user_dict: false
encode_commit_history: false
simplification:
opencc_config: s2t.json
option_name: simplification
# show_in_comment: true #开启编码滤镜
tips: all #简繁对照
history:
input: oo
size: 1 #重复前几次上屏
initial_quality: -1
#滤镜配置
emoji_cn:
opencc_config: emoji.json #配置文件
option_name: emoji_cn #与状态栏开关的名称一致
tips: all #开启注释
#提示配置
TS1:
comment_format:
- xform/([A-Z][0-9]?)+([A-Z][0-9]?)$/$2/
- xform/.....U|.(.)...V|...W|..X|.Y|Z|.....A|....B|...C|..D|.E|F/$1/
- xform/([ABCDEF][0-9]?)$//
- xform/([UVWXYZ][0-9]?)$//
- xform|1||
- xform|~||
TS2:
comment_format:
- xform/([A-Z][0-9]?)+([A-Z][0-9]?)$/$2/
- xform/.....U|.(.)...V|...W|..X|.Y|Z|.....A|....B|...C|..D|.E|F/$1/
- xform|1|_|
- xform/^/〔/
- xform/$/〕/
- xform/ / /
TS3:
comment_format:
- xform/([A-Z][0-9]?)+([A-Z][0-9]?)$/$2/
- xform/.....U|.(.)...V|...W|..X|.Y|Z|.....A|....B|...C|..D|.E|F/$1/
- xform/([ABCDEF][0-9]?)$//
- xform/([UVWXYZ][0-9]?)$//
- xform|~||
#反查配置
#↓音码反查方案
pinyin_simp_lookup:
__include: /TS2
tags: [pinyin_simp]
dictionary: xklb #反查其码
overwrite_comment: true
pinyin_simp:
tag: pinyin_simp
dictionary: pinyin_simp
enable_sentence: true
enable_completion: true
enable_user_dict: false
prefix: "~"
tips: "〔全拼〕"
#↓形码反查方案
xmfc_lookup:
__include: /TS2
tags: [xmfc]
dictionary: xklb #反查其码
overwrite_comment: true
xmfc:
tag: xmfc
dictionary: xmfc
enable_sentence: true
enable_completion: true
enable_user_dict: false
prefix: "#"
tips: "〔提示〕"
xklb_dz:
__include: /TS1
dictionary: xklb_dz
initial_quality: 100
enable_sentence: false
enable_completion: true #逐码提示
enable_user_dict: false
b_sms:
dictionary: ""
user_dict: b_sms
db_class: stabledb
enable_sentence: false
enable_completion: false
initial_quality: 99 #用户词和系统词重码居后
comment_format:
- xform|~||
#二分反查方案
quanpinerfen_lookup:
__include: /TS2
tags: [quanpinerfen]
dictionary: xklb #反查其码
overwrite_comment: true
quanpinerfen:
tag: quanpinerfen
dictionary: ""
user_dict: quanpinerfen
db_class: userdb
enable_sentence: false
enable_completion: true
comment_format:
- xform|~||
reverse_lookup:
__include: /TS2
dictionary: xklb_fc
xklbWXYZ:
__include: /TS1
tag: xklbWXYZ
dictionary: xklb
user_dict: a_yhck
# ↓ 用户词典格式,tabledb(文本) 或 userdb (二进制)。
db_class: tabledb
# db_class: userdb
enable_charset_filter: false
enable_completion: true
enable_encoder: true
enable_sentence: true
enable_user_dict: true
encode_commit_history: false
preedit_format:
- xform|1|_|
prefix: "'"
tips: "〔造词〕"
xklbXX:
__include: /xklbWXYZ
tag: xklbXX
dictionary: xklb_X
prefix: "~X"
tips: "〔X〕"
xklbYY:
__include: /xklbWXYZ
tag: xklbYY
dictionary: xklb_Y
prefix: "~Y"
tips: "〔Y〕"
xklbZZ:
__include: /xklbWXYZ
tag: xklbZZ
dictionary: xklb_Z
prefix: "~Z"
tips: "〔Z〕"
a_yhck:
__include: /TS3
dictionary: ""
user_dict: a_yhck
db_class: stabledb
enable_sentence: false
enable_completion: true #逐码提示
initial_quality: 99 #填100则自造词高于系统词|填99则自造词低于系统词
punctuator:
import_preset: default
half_shape:
'''' : [ '‘', '’' , '\', '﹨' ]
key_binder:
import_preset: default
bindings:
- {accept: "Shift+space", send: space, when: composing} #小狼毫输入法中进行引导造词时的上屏组合键(Shift+space),同文输入法则需要点击候选词上屏
- {accept: "space", send: 1, when: composing} #引导造词中空格等于首选,空格就丧失了上屏的功能(在引导造词中)
- {accept: ";", send: 2, when: composing} #分号次选
recognizer:
import_preset: default
patterns:
reverse_lookup: "[a-z`]*`+[a-z`]*"
xklbWXYZ: "^'[a-z)(,./:?!'][a-z0-9)(,./:?!']*'?$"
# xklbWXYZ: "^'[a-z0-9)(,./:?!']*'?$"
pinyin_simp: "^~[a-z']*'?$"
# xmfc: "^#[a-z']*'?$"
# retention_zi: "^[qwrtypsdfghjklzxcvbnm][a-z]([aeiou]{0,3})?$" #关逐码提示时开启
# retention_ci: "^[qwrtypsdfghjklzxcvbnm][a-z][qwrtypsdfghjklzxcvbnm]([a-z][aeiou]{0,1})?$" #关逐码提示时开启
# aeiou: "^[aei][a-z]*?$" #关逐码提示时开启
b_sms: "^o[a-z]*?$"
quanpinerfen: "^u[a-z]+?$"
jsq: "^=[^a-z@]*?$"