forked from cnfeat/Rime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxkjd6dz.schema.yaml
275 lines (236 loc) · 6.28 KB
/
xkjd6dz.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
# Rime schema settings
# encoding: utf-8
schema:
schema_id: xkjd6dz
name: 键道6单字
version: "1"
author:
- 发明人 大牛
dependencies:
- xkjd6cx
# 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/
# input_code:
# date: orq
# time: ouj
# week: oxq
patterns:
special: "^(?:;?[avuio])[a-z]{0,}"
# input_code: "^(?:orq?|ouj?|oxq?)"
switches:
- name: ascii_mode
reset: 0
states: [ 中, 英 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: jffh
reset: 0
states: [ 简体, 繁體 ]
- name: sbb_hint
reset: 1 # 改成0默认关闭
states: [ "关₆₃₀", "开₆₃₀" ]
- name: EN2en
reset: 1
punctuator:
import_preset: symbols
full_shape:
' ' : { commit: ' ' }
',' : { commit: , }
'.' : { commit: 。 }
'<' : [ 《, 〈, «, ‹ ]
'>' : [ 》, 〉, », › ]
'?' : { commit: ? }
';' : { commit: ; }
':' : { commit: : }
'''' : { pair: [ '‘', '’' ] }
'"' : { pair: [ '“', '”' ] }
# '/' : { commit: / }
'\' : [ 、, \ ]
'|' : [ ·, |, '§', '¦' ]
'`' : `
'~' : ~
'!' : { commit: ! }
'@' : [ @, ☯ ]
'#' : [ #, ⌘ ]
'%' : [ %, '°', '℃' ]
'$' : [ ¥, '$', '€', '£', '¥', '¢', '¤' ]
'^' : { commit: …… }
'&' : &
'*' : [ *, ·, ・, ×, ※, ❂ ]
'(' : (
')' : )
'-' : -
'_' : ——
'+' : +
'=' : [ '=' ]
'[' : [ 「, 【, 〔, [ ]
']' : [ 」, 】, 〕, ] ]
'{' : [ 『, 〖, { ]
'}' : [ 』, 〗, } ]
half_shape:
',' : { commit: , }
'.' : { commit: 。 }
'<' : [ 《, 〈, «, ‹ ]
'>' : [ 》, 〉, », › ]
'/' : { commit: / }
'?' : { commit: ? }
';' : { commit: ; }
':' : { commit: : }
'''' : { pair: [ '‘', '’' ] }
'"' : { pair: [ '“', '”' ] }
'\' : [ 、, '\', \ ]
'|' : [ ·, '|', |, '§', '¦' ]
'`' : '`'
'~' : [ '~', ~ ]
'!' : { commit: ! }
'@' : '@'
'#' : '#'
'%' : [ '%', %, '°', '℃' ]
'$' : [ ¥, '$', '€', '£', '¥', '¢', '¤' ]
'^' : { commit: …… }
'&' : '&'
'*' : [ '*', *, ·, ・, ×, ※, ❂ ]
'(' : (
')' : )
'-' : '-'
'_' : ——
'+' : '+'
'=' : '='
'[' : [ 「, 【, 〔, [ ]
']' : [ 」, 】, 〕, ] ]
'{' : [ 『, 〖, { ]
'}' : [ 』, 〗, } ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- lua_processor@topup_processor
- lua_processor@smart_2
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- history_translator@repeat_history
- table_translator@custom_phrase
- table_translator@danzi_lookup
- lua_translator@date_translator
- lua_translator@time_translator
- lua_translator@number_translator
filters:
- uniquifier
- simplifier@emoji_cn
- simplifier@jffh
- simplifier@bmms
- simplifier@EN2en
# - lua_filter@hint_filter
- lua_filter@xkjd6_filter
- reverse_lookup_filter@danzi_lookup
speller:
algebra:
__include: "layout/algebra"
auto_select: true
auto_select_unique_candidate: true #空码自动顶
alphabet: "zyxwvutsrqponmlkjihgfedcba;/=`"
initials: "abcdefghijklmnopqrstuvwxyz;/=`"
translator:
dictionary: xkjd6dz.extended
enable_charset_filter: false
enable_completion: true
enable_encoder: true
enable_sentence: false
enable_user_dict: false
encode_commit_history: true
max_phrase_length: 6
repeat_history:
input: ;h #重复上次上屏内容
size: 1
initial_quality: 10000
emoji_cn:
opencc_config: emoji.json
option_name: emoji_cn
tips: all
jffh:
opencc_config: s2tw.json
option_name: jffh
EN2en:
opencc_config: EN2en.json
option_name: EN2en
bmms:
opencc_config: pinyin.json
option_name: bmms
show_in_comment: true
comment_format:
- xform/'/ /
danzi_lookup:
dictionary: xkjd6dz.extended
tags: [ danzi_lookup ]
overwrite_comment: true
enable_charset_filter: false
enable_completion: true
enable_encoder: false
enable_sentence: false
enable_user_dict: false
encode_commit_history: false
comment_format:
- xform/^/〔/
- xform/$/〕/
- xform/ /, /
custom_phrase:
dictionary: ""
user_dict: user_dict
db_class: stabledb
enable_sentence: false
initial_quality: "0"
reverse_lookup:
dictionary: xkjd6cx
comment_format:
- xform/^/〔/
- xform/$/〕/
key_binder:
bindings:
- {accept: minus, send: Page_Up, when: has_menu}
- {accept: equal, send: Page_Down, when: has_menu}
- { when: always, accept: F7, toggle: jffh }
# - { when: has_menu, accept: "'", send: 2 }
- { when: has_menu, accept: "&", toggle: emoji_cn}
- { when: has_menu, accept: "^", toggle: bmms}
recognizer:
patterns:
punct: "^/([0-9]0?|[a-z]+)$"
danzi_lookup: "[a-z`]*`+[a-z`]*"
email: "^[a-z][-_.0-9a-z]*@.*$"
uppercase: "[A-Z][-_+.'0-9A-Za-z]*$"
pinyin: "(?<![`A-Z])`[a-z']*;?$"
url: "^(www[.]|https?:|ftp:|mailto:).*$"
english: "^'[A-Z|a-z]*'?$"
jsq: "^=[^;']+$"
topup:
__include: "layout/topup"
min_length: 4
max_length: 6
auto_clear: true
min_length_danzi: 2
topup_command: true