-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathxmjd6.schema.yaml
414 lines (379 loc) · 12.9 KB
/
xmjd6.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
# Rime schema settingsjffh
# encoding: utf-8
# 方案维护者:Proud丶Cat、热热佬、千年蟲
# 方案溯源:星空键道6.2 → 🐈星猫键道6.3
# 教程链接:https://hu0w1jn4xq.feishu.cn/docx/ZgQ8deGPlozhWCxOyeucBvHJnPe
# 方案 GitHub 仓库:https://github.com/hugh7007/xmjd6-rere
# 本方案特色:
# 增加百万词语,优化打字体验。
# o键超级繁体(全字集),让繁体字特殊字不再属于形码专利。
# v键开启二分反查功能(通过键道双拼拆分文字可打全字集)。遇到不会读的字也可以随时随地打出全字集。
# u键开启全拼反查功能拼音查全码,新增笔画提示。
# i键开启英文单词联想输入模式。
# a键开启连打模式,自造词模式。
schema:
schema_id: xmjd6
name: 星🐈键道
icon: ""
author:
- 方案维护者:Proud丶Cat、热热佬、千年蟲
description: |
方案溯源:星空键道6.2 → 🐈星猫键道6.3
本方案特色:
增加百万词语,优化打字体验。
o键超级繁体(全字集),让繁体字特殊字不再属于形码专利。
v键开启二分反查功能(通过键道双拼拆分文字可打全字集)。遇到不会读的字也可以随时随地打出全字集。
u键开启全拼反查功能拼音查全码,新增笔画提示。
i键开启英文单词联想输入模式。
a键开启连打模式,自造词模式。
version: "1"
dependencies:
- xmjd6.cx
- pinyin_simp
- liangfen
- xmjd6.en
- xmjd6.gbk
# Layout config
layout:
topup:
topup_this: "bcdefghjklmnpqrstwxyz"
topup_with: "avuio;"
algebra:
- derive/^[bcdefghjklmnpqrstwxyz;]([bcdefghjklmnpqrstwxyz;][avuio].*)$/`$1/
- derive/^([bcdefghjklmnpqrstwxyz;])[bcdefghjklmnpqrstwxyz;]([avuio].*)$/$1`$2/
- derive/^([bcdefghjklmnpqrstwxyz;`]{2})[avuio](.*)$/$1`$2/
- derive/^([bcdefghjklmnpqrstwxyz;`]{2}[avuio`]).(.*)$/$1`$2/
- derive/^([bcdefghjklmnpqrstwxyz;`]{2}[avuio`]{2}).(.*)$/$1`$2/
- derive/^([bcdefghjklmnpqrstwxyz;`]{2}[avuio`]{3}).(.*)$/$1`$2/
- derive/^([bcdefghjklmnpqrstwxyz;`]{2}[avuio`]{4}).(.*)$/$1`$2/
- derive/^([bcdefghjklmnpqrstwxyz;`]{2}[avuio`]{5}).$/$1`/
- derive/^[bcdefghjklmnpqrstwxyz;]{2}([avuio`]*)$/``$1/
patterns:
special: "^(?:;?[avuio])[a-z]{0,}"
switches:
- name: ascii_mode # custom.yaml的开关0
reset: 0
states: [ 中文, 西文 ]
- name: ascii_punct # custom.yaml的开关1
reset: 0
states: [ 全角, 半角 ]
- name: jffh # custom.yaml的开关2
reset: 0
states: [ 简体, 繁體 ]
- name: mars # custom.yaml的开关3
reset: 0
states: [ 地球文, 火星文 ] #火星文
- name: emoji_cn #Emoji开关 # custom.yaml的开关4
reset: 1 # 1为默认开启
states: [ 简约, 表情展示 ]
- name: embeded_cands # custom.yaml的开关5
reset: 0
states: [普通, 嵌入候选]
- name: sbb_hint # custom.yaml的开关6
reset: 1
states: [ 简约, 630提示 ]
- name: completion
reset: 1
states: [ 简约, 逐码展示 ]
# - name: full_shape
# states: [ 半角, 全角 ]
#提示词开关在下方,请根据注释查找
engine:
processors:
- lua_processor@*xmjd6/xmjd6_select_character # 以词定字
- ascii_composer
- recognizer
- key_binder
- lua_processor@*xmjd6/xmjd6_smart_2 #这个注释后不会顶功,使用流式请注释这两行
- lua_processor@*xmjd6/xmjd6_topup_processor #这个注释后不会顶功,使用流式请注释这两行
- lua_processor@*xmjd6/add_ge # 可以在词的首字后加 "个"字,比如 吃饭-> 吃个饭
- lua_processor@*xmjd6/bianzi
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- affix_segmentor@pinyin_simp
- affix_segmentor@xmjd6en
- affix_segmentor@quanpinerfen
- affix_segmentor@xmjdWXYZ
- affix_segmentor@xmjd6gbk
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- lua_translator@*xmjd6/xmjd6_jisuanqi
- lua_translator@*xmjd6/xmjd6_shijian
- lua_translator@*xmjd6/xmjd6_zimu_translator
- lua_translator@*xmjd6/xmjd6_shuzi
- lua_translator@*xmjd6/unicode # 使用< & >开头启动
- punct_translator
- table_translator
- reverse_lookup_translator
- table_translator@xmjdWXYZ
- table_translator@xmjdYY
- table_translator@xmjdZZ
- table_translator@xmjdWW
- table_translator@xmjd6_user
- history_translator@repeat_history
- history_translator@repeat_history2
- script_translator@quanpinerfen
- script_translator@pinyin_simp
- table_translator@xmjd6en
- script_translator@xmjd6gbk
- lua_translator@*xmjd6/force_gc
filters:
- simplifier
- reverse_lookup_filter@pinyin_simp_lookup
- reverse_lookup_filter@quanpinerfen_lookup
- reverse_lookup_filter@gbk_lookup
- lua_filter@*xmjd6/xmjd6_single_char #候选单字优先
- lua_filter@*xmjd6/xmjd6_filter
- simplifier@emoji_cn
- simplifier@jffh
- simplifier@ascii_punct
- simplifier@mars #火星文
- lua_filter@*xmjd6/xmjd6_embeded_cands@embeded_cands #嵌入候选
- lua_filter@*xmjd6/add_space # \n 回车| 空格
- uniquifier
#导入符号
punctuator:
import_preset: xmjd6.symbols
speller:
auto_select: false
alphabet: "zyxwvutsrqponmlkjihgfedcba;'" # 【"zyxwvutsrqponmlkjihgfedcba;'"】 修改为【"zyxwvutsrqponmlkjihgfedcba"】会直接上屏,但无法使用;+字母打快符。记得修改348、349行
initials: "abcdefghijklmnopqrstuvwxyz;'"
delimiter: " '"
algebra:
- derive/[0-9]$// #无数字
- derive|^;|/|
translator:
dictionary: xmjd6.extended
enable_charset_filter: false
enable_completion: true #提示码开关,不需要候选词提示请改false
enable_encoder: true
enable_sentence: false #要想使用流式请改为true
enable_user_dict: false #要想使用流式请改为true
encode_commit_history: true
max_phrase_length: 6
initial_quality: 0
comment_format:
# - xform|~||
- xform/[0-9]// #无数字
repeat_history:
input: i #重复上次上屏内容
size: 3
initial_quality: 10000
repeat_history2:
input: ;f #重复上次上屏内容
size: 3
initial_quality: 10000
emoji_cn:
opencc_config: xmjd6/xmjd6_emoji.json
option_name: emoji_cn
comment_format:
# - xform/.*// #不会有透明的文字显示
- xform/.*/ / #原始的后面会有长度显示
# tips: all #不显示表情备注
jffh:
opencc_config: xmjd6/xmjd6_s2tw.json
option_name: jffh
mars:
opencc_config: xmjd6/xmjd6_martian.json
option_name: mars
ascii_punct:
option_name: ascii_punct
#↓gbk反查方案
gbk_lookup:
tags: [xmjd6gbk]
dictionary: xmjd6.cx #反查其码
overwrite_comment: true
xmjd6gbk:
tag: xmjd6gbk
dictionary: xmjd6.gbk
enable_sentence: true
enable_completion: true
enable_user_dict: false
# comment_format:
# - xform/.*//
prefix: "o"
# tips: "〔GBK字集〕"
pinyin_simp_lookup:
tags: [pinyin_simp]
dictionary: xmjd6.cx #反查其码
overwrite_comment: true
pinyin_simp:
tag: pinyin_simp
dictionary: pinyin_simp
enable_sentence: true
enable_completion: true
enable_user_dict: false
preedit_format:
- xform/^u(.+)/$1/
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
prefix: "u"
tips: "〔全拼〕"
xmjd6en:
tag: xmjd6en
dictionary: xmjd6.en
enable_sentence: true
enable_completion: true
enable_user_dict: false
comment_format:
- xform/.*//
prefix: "i"
tips: "〔单词〕"
#↓二分反查方案
quanpinerfen_lookup:
tags: [quanpinerfen]
dictionary: xmjd6.cx #反查其码
overwrite_comment: true
quanpinerfen:
tag: quanpinerfen
dictionary: liangfen
enable_sentence: true
enable_completion: true
enable_user_dict: false
prefix: "v"
tips: "〔二分〕"
reverse_lookup:
dictionary: xmjd6.cx
enable_completion: true # 逐鍵顯示
comment_format:
- xform/^/〔/
- xform/$/〕/
- xform/ /, /
xmjdWXYZ:
tag: xmjdWXYZ
dictionary: xmjd6.extended
user_dict: xmjd6_user
# ↓ 用户词典格式,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|_|
comment_format:
- xform|1|_|
# - xform|~||
prefix: "a"
tips: "〔造词〕"
xmjdYY:
__include: /xmjdWXYZ
tag: xmjdYY
dictionary: xmjd6.Y
prefix: "~E"
tips: "〔Y〕"
xmjdZZ:
__include: /xmjdWXYZ
tag: xmjdZZ
dictionary: xmjd6.Z
prefix: "~R"
tips: "〔Z〕"
xmjdWW:
__include: /xmjdWXYZ
tag: xmjdWW
dictionary: xmjd6.W
prefix: "~T"
tips: "〔W〕"
xmjd6_user:
dictionary: ""
user_dict: xmjd6_user
db_class: stabledb
enable_sentence: false
enable_completion: true
comment_format:
- xform/[0-9]// #无数字
# - xform|~||
initial_quality: -1 #原始的 -1<关>/999999<开>修改这个会影响自造词是否会变成第一位
# 嵌入候選的顯示配置
# 默認顯示效果爲:
# 宇[浩¹]iwl ~淍² ~泃³
embeded_cands:
option_name: embeded_cands # 嵌入候選開關
index_indicators: [ ¹, ², ³, ⁴, ⁵, ⁶, ⁷, ⁸, ⁹, ⁰ ] # 嵌入候選的序號顯示格式
first_format: "${Stash}[${候選}${Seq}]${Code}${Comment}" # 首選的渲染格式
next_format: "${Stash}${候選}${Seq}${Comment}" # 非首選的渲染格式
separator: " " # 候選之間的分隔符
stash_placeholder: "~"
# punctuator:
# import_preset: default
# half_shape:
# '''' : [ '‘', '’' , '\', '﹨' ]
key_binder:
# import_preset: default
select_first_character: "bracketleft" # 左中括号 [
select_last_character: "bracketright" # 右中括号 ]
add_ge: "backslash"
bian_zi: "slash"
bindings:
- { when: always, accept: "Control+period", toggle: ascii_punct }
- {accept: minus, send: Page_Up, when: has_menu}
- {accept: equal, send: Page_Down, when: has_menu}
# - { when: has_menu, accept: Tab, send: 1 } # tab 首选
- { when: has_menu, accept: Tab, send: 2 } # tab 次选
- {accept: semicolon, send: 2, when: has_menu} #分号次选 # 需要;符号顶直接顶注释本行,并修改第152行
- {accept: apostrophe, send: 3, when: has_menu} #撇号三选 # 如果注释348次选,请也注释349,可以使【’】变为选择次选
# - {accept: comma, send: Page_Up, when: has_menu} #<,>翻页功能
# - {accept: period, send: Page_Down, when: has_menu} #<。>翻页功能
# - {accept: bracketleft, send: Page_Up, when: has_menu} # [上翻页
# - {accept: bracketright, send: Page_Down, when: has_menu} # ]下翻页
- { when: always, accept: F6, select: .next }
- { when: always, accept: F7, toggle: jffh } # 电脑的繁体切换
- { when: always, accept: "Control+backslash", toggle: emoji_cn } #快捷电脑的快捷
- { when: has_menu, accept: "&", toggle: emoji_cn } #手机快捷切换表情
- { when: has_menu, accept: "%", toggle: mars } #手机快捷火星文切换
- { when: has_menu, accept: "*", toggle: jffh } #手机快捷简繁切换
- { when: has_menu, accept: "$", toggle: embeded_cands } #手机快捷切换内嵌
- {accept: KP_0, send: 0, when: composing}
- {accept: KP_1, send: 1, when: composing}
- {accept: KP_2, send: 2, when: composing}
- {accept: KP_3, send: 3, when: composing}
- {accept: KP_4, send: 4, when: composing}
- {accept: KP_5, send: 5, when: composing}
- {accept: KP_6, send: 6, when: composing}
- {accept: KP_7, send: 7, when: composing}
- {accept: KP_8, send: 8, when: composing}
- {accept: KP_9, send: 9, when: composing}
- {accept: KP_Subtract, send: -, when: composing}
- {accept: KP_Divide, send: /, when: composing}
- {accept: KP_Multiply, send: "*", when: has_menu}
- {accept: KP_Add, send: +, when: has_menu} #原始 → KP_Add
- {accept: KP_Decimal, send: ".", when: has_menu}
recognizer:
#import_preset: default
patterns:
email: "^[A-Za-z][-_.0-9A-Za-z]*@.*$"
uppercase: "[A-Z][-_+.'0-9A-Za-z]*$"
url: "^(www[.]|https?:|ftp[.:]|mailto:|file:).*$|^[a-z]+[.].+$"
reverse_lookup: "[a-z`]*`+[a-z`]*"
punct: "^/([0-9]0?|[a-z]+)$"
xmjdWXYZ: "^a['/a-z][a-z,./:?!']*'?$"
pinyin_simp: "^u[a-z']*'?$"
quanpinerfen: "^v[a-z']*'?$"
xmjd6en: "^i[a-z]*?$"
xmjd6gbk: "^o[a-z]*?$"
jsq: "^=[^;']+$"
zhuan: "^\\\\.*$" # 不加这句后面不能跟数字
unicode: "^&+.*$"
# zhuanxiao: "^\\+.*$" # 不加这句后面不能跟数字
# xmjdWXYZ: "^'['/a-z][a-z0-9,./:?!']*'?$"
topup:
__include: "layout/topup"
min_length: 4
max_length: 6
auto_clear: true
min_length_danzi: 2
topup_command: true
menu:
page_size: 5 #请到xmjd6.custom.yaml去修改