-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtxjx.schema.yaml
251 lines (224 loc) · 6.58 KB
/
txjx.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
# Rime schema settings
# encoding: utf-8
schema:
schema_id: txjx
name: 天行键
icon: "tian.ico"
version: "1.0"
author:
- 大牛(吅吅大山)
- 浮生 <wzxmer@outlook.com>
dependencies:
- txjx.cx
- liangfen
- txjx.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
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
reset: 0
states: [ 半角, 全角 ]
- name: jffh
reset: 0
states: [ 简体, 繁體 ]
- name: emoji_cn #Emoji开关
reset: 1
states: [ 关闭表情, 开启表情 ]
- name: embeded_cands
reset: 0
states: [普通, 嵌入候选]
- name: sbb_hint
reset: 0
states: [ 关闭630提示, 开启630提示 ]
- name: completion
reset: 1
states: [提示关,提示开]
# - name: full_shape
# states: [ 半角, 全角 ]
#提示词开关在下方,请根据注释查找
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- lua_processor@*txjx_smartTwo #这个注释后不会顶功,使用流式请注释这两行
- lua_processor@*txjx_forTopUp #这个注释后不会顶功,使用流式请注释这两行
- lua_processor@*txjx_select_character #以词定字
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- affix_segmentor@jderfen
- affix_segmentor@txjxgbk
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- lua_translator@*txjx_jisuanqi
- lua_translator@*txjx_time
- lua_translator@*txjx_zimu
- punct_translator
- table_translator
- reverse_lookup_translator
- history_translator@repeat_history
- script_translator@jderfen
- script_translator@txjxgbk
filters:
- simplifier
- reverse_lookup_filter@jderfen_lookup
- reverse_lookup_filter@gbk_lookup
- lua_filter@*txjx_embeded_cands@embeded_cands #内嵌
- lua_filter@*txjx_completion #辅助码提示
- lua_filter@*txjx_single_char #候选辅助码单字优先
- simplifier@emoji_cn
- simplifier@jffh
- simplifier@ascii_punct
- lua_filter@*txjx_filter
- uniquifier
#导入符号
punctuator:
import_preset: txjx.symbols
speller:
# algebra:
# __include: "layout/algebra"
auto_select: false
alphabet: "zyxwvutsrqponmlkjihgfedcba;‘"
initials: "abcdefghijklmnopqrstuvwxyz;‘"
delimiter: " '"
algebra:
- derive/[0-9]$// #无数字
- derive|^;|/|
translator:
dictionary: txjx.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: ;f #重复上次上屏内容
size: 1
initial_quality: 10000
emoji_cn:
opencc_config: txjx.emoji.json
option_name: emoji_cn
#不显示表情备注
#tips: all
jffh:
opencc_config: s2g.json
option_name: jffh
ascii_punct:
option_name: ascii_punct
#↓二分反查方案
jderfen_lookup:
tags: [jderfen]
dictionary: txjx.cx #反查其码
overwrite_comment: true
comment_format:
- xform/ /,/
jderfen:
tag: jderfen
dictionary: liangfen
enable_sentence: true
enable_completion: true
enable_user_dict: false
prefix: "v"
tips: "〔二分〕"
#↓gbk反查方案
gbk_lookup:
tags: [txjxgbk]
dictionary: txjx.cx #反查其码
overwrite_comment: true
comment_format:
- xform/ /,/
txjxgbk:
tag: txjxgbk
dictionary: txjx.gbk
enable_sentence: true
enable_completion: true
enable_user_dict: false
# comment_format:
# - xform/.*//
prefix: "o"
# tips: "〔GBK字集〕"
reverse_lookup:
dictionary: txjx.cx
enable_completion: true # 逐鍵顯示
comment_format:
- xform/ /,/
# - xform/^/〔/
# - xform/$/〕/
# 内嵌配置
# 默認顯示效果爲:
# 宇[浩¹]iwl ~淍² ~泃³
embeded_cands:
option_name: embeded_cands # 嵌入候選開關
index_indicators: [ ¹, ², ³, ⁴, ⁵, ⁶, ⁷, ⁸, ⁹, ⁰ ] # 嵌入候選的序號顯示格式
first_format: "${Stash}[${Seq}${候選}]${Code}${Comment}" # 首選的渲染格式
next_format: "${Stash}${Seq}${候選}${Comment}" # 非首選的渲染格式
separator: " " # 候選之間的分隔符
stash_placeholder: "~"
key_binder:
# import_preset: default
#以词定字
select_first_character: "bracketleft" # 左中括号 [
select_last_character: "bracketright" # 右中括号 ]
bindings:
- { when: always, accept: "Control+period", toggle: ascii_punct }
- { when: always, accept: "Control+Shift+2", toggle: ascii_mode }
- { accept: minus, send: Page_Up, when: has_menu}
- { accept: equal, send: Page_Down, when: has_menu}
- { when: always, accept: F7, toggle: jffh }
- { when: always, accept: "Control+Shift+e", toggle: emoji_cn }
- { when: always, accept: "Control+Shift+asciitilde", toggle: full_shape }
- { when: has_menu, accept: Tab, send: 2 } # tab 次选
recognizer:
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]+)$"
#punct2: "^;([a-z]+)$"
jderfen: "^v[a-z']*'?$"
txjxgbk: "^o[a-z]*?$"
jsq: "^=[^;']+$"
zhuan: "^-.*$"
zhuanxiao: "^\\+.*$" # 不加这句后面不能跟数字
menu:
alternative_select_keys: 1234567890
topup:
__include: "layout/topup"
min_length: 4
max_length: 6
auto_clear: true
min_length_danzi: 2
topup_command: false