-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path092wubi.schema.yaml
298 lines (256 loc) · 8.46 KB
/
092wubi.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
schema:
dependencies:
- 092core
- 092chaifen
- emoji
- html_chars
- latin_international
- ipa_yunlong
#- short_punct TODO
- named_ipa_diacritics
name: "092修订版"
schema_id: 092wubi
version: 1
switches: # 0 默认关,1 默认开
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ] #中英文状态
- name: extended_char #自定义字集
reset: 1
states: [ 全字集 , 常用字 ]
- name: pinyin #拼音滤镜
reset: 0
states: [ 拼, pīn ]
- name: emoji_cn #emoji滤镜
reset: 0
states: [ 😔, 😀 ]
- name: chaifen
reset: 0
states: [ 拆隐, 拆显 ]
- name: simplification #简转繁滤镜
reset: 0
states: [ 简中, 繁中 ]
- name: charset_comment_filter #字符集提示
reset: 0
states: [ U区关, U区开 ]
- name: udpf_switch
reset: 0
states: [ U编关, U编开 ]
- name: ascii_punct
reset: 0
states: [ 。,, ., ]
- name: dz_ci #过滤词组
reset: 0
states: [ 词组, 单字 ]
- name: full_shape
reset: 0
states: [ 半角, 全角 ]
- name: preedit_is_candidate
reset: 0
states: [ "预览为候选", "预览为编码" ]
engine:
processors:
- lua_processor@log_processor
- ascii_composer
- lua_processor@alphabet_mode_processor
#- lua_processor@short_punct_pre_recognizer_processor
- recognizer
- lua_processor@enter_clear_input_processor
#- lua_processor@short_punct_pre_speller_processor
- speller
- lua_processor@alphabet_mode_post_speller_processor
- key_binder
- lua_processor@cancel_input_processor
- punctuator
- lua_processor@exe_processor #exe启动器
- lua_processor@reselect_candidates_processor
- selector
- navigator
- express_editor #计算
segmentors: # 分段
- ascii_segmentor
- matcher
- affix_segmentor@emoji
- affix_segmentor@html_chars
- affix_segmentor@latin_input
- affix_segmentor@ipa_input
- affix_segmentor@sys_env
- affix_segmentor@help_translator
- affix_segmentor@named_ipa_diacritics
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- reverse_lookup_translator #拼音反查
- table_translator
- table_translator@emoji
- table_translator@html_chars
- table_translator@latin_input
- table_translator@ipa_input
- table_translator@named_ipa_diacritics
- lua_translator@number_translator # 数字转大写
- lua_translator@calculator_translator # 简易计算器
- lua_translator@shijian2_translator # 高级时间
- lua_translator@alphabet_mode_translator
- lua_translator@unicode_input_translator
- lua_translator@info_translator
- lua_translator@sys_env_translator
- lua_translator@help_translator
filters:
- lua_filter@core092_filter #自定义字集过滤lua;放在最上面完美解决简繁滤镜出错的问题
- simplifier@simplification #简繁滤镜
- simplifier@pinyin #拼音滤镜
- lua_filter@filter_092chaifen
- simplifier@emoji_cn #表情滤镜
- lua_filter@charset_comment_filter #Unicode分区提示滤镜
- lua_filter@lua_unicode_display_filter #Unicode编码显示
- lua_filter@preedit_candidate_filter
- uniquifier #过滤重复
- lua_filter@dz_ci
speller:
auto_clear: max_length # 3种选择, manual|auto|max_length 空码按下一键确认清屏|空码自动清|达到最长码时后码顶上清屏
auto_select: true
max_code_length: 4
alphabet: "zyxwvutsrqponmlkjihgfedcba"
translator:
dictionary: 092wubi
enable_charset_filter: false
enable_encoder: false
enable_sentence: false
encode_commit_history: false
# max_phrase_length: 4
enable_user_dict: false
enable_completion: false # 编码提示 true 开启 false 关闭
comment_format: #提示码自定义
- "xform/~/ /" #去掉编码提示前的~号
# - "xform/^/ /" #提示前面 +间距
reverse_lookup:
dictionary: luna_pinyin
prefix: "`"
tips: "〔拼音〕"
preedit_format:
- "xform/([nl])v/$1ü/"
- "xform/([nl])ue/$1üe/"
- "xform/([jqxy])v/$1u/"
comment_format:
- "xform/^/ /"
# suffix: "'"
key_binder:
# import_preset: default
bindings:
- { accept: space, send: space, when: has_menu } # 有候选时空格上屏首选
- { accept: semicolon, send: 2, when: has_menu } # 次选
- { accept: Alt_R, send: 3, when: has_menu }
- { accept: Alt_L, send: 4, when: has_menu }
- { accept: bracketleft, send: 5, when: has_menu }
- { accept: apostrophe, send: 6, when: has_menu }
#- { accept: 2, send: 7, when: has_menu }
# - { accept: 3, send: 8, when: has_menu }
# - { accept: 8, send: 9, when: has_menu }
# - { accept: 9, send: 0, when: has_menu }
- { when: has_menu, accept: minus, send: Page_Up } # - 向后翻页
- { when: has_menu, accept: equal, send: Page_Down } # = 向前翻页
- { accept: "Control+o", toggle: simplification, when: composing } # 简繁开关
- { accept: "Control+p", toggle: pinyin, when: composing } # PC 拼音开关
- { accept: "Control+e", toggle: emoji_cn, when: composing } # PC emoji开关
- { accept: "Control+u", toggle: charset_comment_filter, when: composing } # PC Unicode分区开关
- { accept: "Control+y", toggle: udpf_switch, when: composing } #PC Unicode编码开关
- { accept: "Control+h", toggle: extended_char, when: composing } # PC 自定字集开关
- { accept: "Control+j", toggle: chaifen, when: composing } # PC 拆分滤镜开关
- { accept: "Control+d", toggle: dz_ci, when: composing } # 单字与词组切换
- { accept: "Control+i", toggle: preedit_is_candidate, when: composing } # preedit为候选 开关
- { accept: "Control+s", toggle: full_shape, when: always }
- { when: always, accept: "Control+period" , toggle: ascii_punct } # 中英标点切换
- { accept: space, send: Escape, when: composing } #无候选时(空码)空格清屏
- { accept: Tab, send: apostrophe, when: always }
- { accept: Release+Tab, send: Release+apostrophe, when: always }
recognizer:
import_preset: default
patterns:
punct: "^/(?!uni)(?!cal)(?!num)(?!info)(?!hc)(?!em)(?!lt)(?!ipa)(?!env/)(?!help)(?!nipa)([0-9]0?|[A-Za-z]+)$"
# uppercase: "" #中文状态大写锁定直接上屏
reverse_lookup: "^`[a-z]*'?$"
alphabet_mode: '^[;A-Z].*$'
expression: "^=.*$"
unicode: "^/uni[a-zA-Z0-9]*$"
number_chinese: '^/num([0-9]+\.?[0-9]*)?$'
calendar: '^/cal[0-9]*$'
emoji: '^/em[a-zA-Z0-9\-\+]*$'
info: '^/info$'
html_chars: '^/hc[a-zA-Z0-9]*$'
latin_input: '^/lt[A-Za-z0-9`\-=\[\];'',\.\/~!\^\*\(\)\+:\"<>\?]*$'
ipa_input: '^/ipa.*$'
sys_env: '^/env/.*$'
help: '^/help$'
named_ipa_diacritics: '^/nipa[a-zA-Z0-9\-]*$'
# ↓简繁(+部分异体)滤镜
simplification: #⇩四选一
opencc_config: st_tu.json # 简 ➡ 繁·异(秃版标准)
# opencc_config: s2tw.json # 简 ➡ 台湾正体
# opencc_config: s2hk.json # 简 ➡ 香港繁体
# opencc_config: s2twp.json # 简 ➡ 台湾正体(含常用词汇如:软体→軟體、鼠标→滑鼠)
option_name: simplification
tips: all #all字词|char字
# ↓拼音滤镜
pinyin:
opencc_config: pinyin.json
option_name: pinyin
show_in_comment: true #作为注解在后面显示
comment_format:
- 'xform/ / /'
# - "xform/^/ /"
tips: all
tags:
- abc
- tiger
# - reverse_lookup
# ↓emoji表情滤镜
emoji_cn:
opencc_config: emoji.json
option_name: emoji_cn
tips: all
emoji:
dictionary: emoji
tag: emoji
tips: 〔Emoji〕
prefix: '/em'
enable_completion: true
enable_sentence: false
enable_user_dict: false
html_chars:
dictionary: html_chars
tag: html_chars
tips: 〔字符代码〕
prefix: '/hc'
enable_completion: true
enable_sentence: false
enable_user_dict: false
latin_input:
dictionary: latin_international
tag: latin_input
tips: 〔Latin〕
prefix: '/lt'
enable_completion: true
enable_sentence: false
enable_user_dict: false
comment_format:
- xform/^~(.*)$/$1/
ipa_input:
dictionary: ipa_yunlong
tag: ipa_input
tips: 〔IPA〕
prefix: '/ipa'
enable_completion: true
enable_sentence: false
enable_user_dict: false
named_ipa_diacritics:
dictionary: named_ipa_diacritics
tag: named_ipa_diacritics
tips: 〔IPA〕
prefix: '/nipa'
enable_completion: true
enable_sentence: false
enable_user_dict: false
punctuator:
import_preset: symbols