-
Notifications
You must be signed in to change notification settings - Fork 12
/
cqyx.schema.yaml
251 lines (222 loc) · 5.94 KB
/
cqyx.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: cqyx
name: "超强音形"
version: "1.0"
author:
- 付东升
description: |
超强音形。按 i 键临时拼音或者用拼音反查编码
dependencies:
- ipinyin
- english
menu:
page_size: 6 #候选项数
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: ascii_punct
states: [ 。,, ., ]
- name: zh_trad
reset: 0
states: [ 简,繁 ]
- name: jiayin # 以形查音
reset: 1
- name: emoji_suggestion
reset: 0
states: ["🈚️", "🈶"]
engine:
processors:
- ascii_composer
- lua_processor@switch_processor
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- "affix_segmentor@mkst"
- "affix_segmentor@zhuyin_fix"
- "affix_segmentor@veng" #临时英文
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- reverse_lookup_translator
- table_translator
- "table_translator@fixed"
- "table_translator@mkst"
- "table_translator@zhuyin_fix"
- "lua_translator@helper"
- "lua_translator@time_date"
- table_translator@veng
- history_translator@historyz
- table_translator@i+
filters:
- reverse_lookup_filter@i_reverse_lookup
- simplifier
- "simplifier@jiayin"
- uniquifier
- "simplifier@emoji_suggestion"
speller:
alphabet: 'abcdefghijklmnopqrstuvwxyz'
initials: 'abcdefghijklmnopqrstuvwxyz'
delimiter: " ;'`"
auto_clear: auto #manual|auto|max_length 空码按下一键确认清屏|空码自动清|达到最长码时后码顶上清屏
auto_select: true
max_code_length: 4
auto_select_pattern: "(^[uv].$)|^.{4}$"
algebra: ##
# - derive/^(i.*[zcs])h(.*$)/$1$2/
# - derive/^(i.*[zcs])([^h].*$)/$1h$2 1/
# - derive/^(i.*[ie]n)g(.*$)/$1$2/
# - derive/^(i.*[ie]n)([^g].*$)/$1g$2 1/
#
# - derive/^(i.*[zcs])h(.*$)/$1$2/
# - derive/^(i.*[zcs])([^h].*$)/$1h$2 1/
# - derive/^(i.*[ie]n)g(.*$)/$1$2/
# - derive/^(i.*[ie]n)([^g].*$)/$1g$2 1/
translator:
dictionary: cqyx.src
#prism: cqyx
initial_quality: 0
enable_charset_filter: true
enable_encoder: false
enable_completion: true
enable_sentence: false
encode_commit_history: false
enable_user_dict: false
max_phrase_length: 4
disable_user_dict_for_patterns:
- "^[ivu].*$"
- "^.*$"
preedit_format:
- xform/^i(.*)/$1/
- xform/^v/z/
comment_format:
- xform/~/ /
historyz:
input: uj
size: 1
initial_quality: 0
fixed:
__include: /translator
initial_quality: -1000
enable_completion: false
enable_encoder: true
enable_user_dict: true
db_class: tabledb #userdb tabledb
disable_user_dict_for_patterns:
- "^.{1,3}$"
mkst:
__include: /translator
enable_sentence: true
prefix: '`'
tips: "〔精准造词〕"
tag: mkst
zhuyin_fix:
__include: /translator
prefix: '~'
tips: "〔以形查音〕"
tag: zhuyin_fix
simplifier:
opencc_config: s2t.json
option_name: zh_trad
jiayin:
opencc_config: jiayin.json
option_name: jiayin
show_in_comment: true
comment_format:
- "xform/<br>/\r/"
- "xform/ / /"
tags:
# - abc
- zhuyin_fix
tips: all
emoji_suggestion:
opencc_config: emoji.json
option_name: emoji_suggestion
tips: all
veng:
dictionary: english
tag: veng
prefix: ";"
suffix: " "
tips: "〔临时英文〕"
enable_completion: true
enable_encoder: false
enable_user_dict: false
enable_sentence: false
initial_quality: -1
i+:
dictionary: ipinyin
enable_completion: true
enable_sentence: false
enable_encoder: false
enable_user_dict: false
initial_quality: -10
punctuator:
import_preset: symbols #symbols 使用rime自带符号文件|default 不使用
full_shape:
"/" : "、"
half_shape:
"/" : "、"
ascii_composer:
switch_key:
Control_L: noop # noop 无 |clear 字符被清除,转英文输入
Control_R: noop # noop 无 |commit_text 输入一段编码字符后汉字上屏,转英文输入
Shift_L: commit_code # 编码直接上屏,转英文输入
Shift_R: inline_ascii # 编码不上屏,转英文输入,Enter上屏,之后还是中文输入
Caps_Lock: clear
Eisu_toggle: clear
key_binder:
import_preset: default
bindings:
- {accept: Left, send: Up, when: has_menu}
- {accept: Right, send: Down, when: has_menu}
- {accept: minus, send: Page_Up, when: has_menu}
- {accept: equal, send: Page_Down, when: has_menu}
- {accept: semicolon, send: 2, when: has_menu} # 分号选2重
- {accept: apostrophe, send: 3, when: has_menu} # 引号选3重
- {accept: space, send: space, when: has_menu}
- {accept: Return, send: Escape, when: has_menu}
- {accept: "Control+Shift+4", toggle: zh_trad, when: always} # 繁简转换
- {accept: "Control+Shift+dollar", toggle: zh_trad, when: always} # 繁简转换
- {accept: "Control+Shift+F", toggle: zh_trad, when: always} # 繁简转换
- {accept: "Control+Shift+H", toggle: emoji_suggestion, when: always} # emjoy开关
recognizer:
import_preset: default
patterns:
i_reverse_lookup_pattern: "^i.[a-z]+$"
mkst: "^[a-z]*`[a-z`]*$"
zhuyin_fix: "~[a-z]*?$"
email: "^[A-Za-z][-_.0-9A-Za-z]*@.*$"
helper: '^help$'
punct: "^/([0-9]0?|[A-Za-z]+)$"
uppercase: "[A-Z][-_+.'0-9A-Za-z]*$"
url: "^(www[.]|https?:|ftp[.:]|mailto:|file:).*$"
veng: "^;.*$"
i_reverse_lookup:
tags: [ i_reverse_lookup_pattern ]
dictionary: cqyx.src
overwrite_comment: true
comment_format: &comment
- xform/(^|\W)(\w{2,3})\W(\2\w+)/$1$3/
- xform/(^|\W)(\w{2,3})\W(\2\w+)/$1$3/
- xform/(^|\W)(\w{2,3})\W(\2\w+)/$1$3/
- xform/(^|\W)([^uioav])\W(\2\w+)/$1$3/
- xform/(\W)[ivu]\w+//
- xform/(^)[ivu]\w+\W/$1/
- xform/(^)[ivu]\w+$//
- xform/ /\ |\ /
- xform/$/\] /
- xform/^/ \[/