-
Notifications
You must be signed in to change notification settings - Fork 12
/
cqkm.schema.yaml
236 lines (216 loc) · 5.84 KB
/
cqkm.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
# Rime schema settings
# encoding: utf-8
# 要改配置请参照超强快码重码版配置的注释
schema:
schema_id: cqkm
name: "超强快码"
version: "1.0"
author:
- 付东升
description: |
超强快码。按 i 键临时拼音或者用拼音反查编码
dependencies:
- ipinyin
- english
- spelling
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: new_spelling
reset: 0
states: [ 隐, 显 ]
- name: new_hide_pinyin
reset: 1
states: [ 音, 哑 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: ascii_punct
states: [ 。,, ., ]
- name: zh_trad
reset: 0
states: [ 简,繁 ]
- name: emoji_suggestion
reset: 0
states: ["🈚️", "🈶"]
engine:
filters:
- charset_filter@gb2312
- simplifier
- reverse_lookup_filter@i_reverse_lookup
- lua_filter@new_spelling@spelling
- lua_filter@single_char
- uniquifier
- "simplifier@emoji_suggestion"
processors:
- ascii_composer
- lua_processor@submit_text_processor
- lua_processor@switch_processor
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- "affix_segmentor@mkst"
- "affix_segmentor@veng"
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- reverse_lookup_translator
- table_translator
- "table_translator@fixed"
- "table_translator@mkst"
- "lua_translator@helper"
- "lua_translator@time_date"
- table_translator@veng
- history_translator@historyz
- table_translator@i+
speller:
alphabet: 'abcdefghijklmnopqrstuvwxyz'
initials: 'abcdefghijklmnopqrstuvwxyz'
delimiter: "`"
auto_clear: max_length
auto_select: true
# max_code_length: 5
# auto_select_pattern: "(^[uv].$)|^.{5}$|^.{4}$"
translator:
dictionary: cqkm.src
initial_quality: 0
enable_charset_filter: false
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/~/ /
fixed:
__include: /translator
initial_quality: -1000
enable_completion: false
enable_encoder: true
enable_user_dict: true
db_class: tabledb
disable_user_dict_for_patterns:
- "^.{1,3}$"
mkst:
__include: /translator
enable_sentence: true
prefix: '`'
tips: "〔精准造词〕"
tag: mkst
lua_reverse_db:
spelling: spelling
code: spelling
simplifier:
opencc_config: s2t.json
option_name: zh_trad
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
#i_reverse_lookup:
# tags: [ i_reverse_lookup_pattern ]
# dictionary: cqkm.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/^/ \[/
historyz:
input: uj
size: 1
initial_quality: 0
recognizer:
import_preset: default
patterns:
i_reverse_lookup_pattern: "^i.[a-z]+$"
mkst: "^[a-z]*`[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: "^;.*$"
xxx: "^[^uv][a-z]{2}$"
xx: "^[^uv][a-z]$"
charset_filter:
option_name: gb2312
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+G", toggle: emoji_suggestion, when: always}
- {accept: "Control+Shift+H", toggle: new_spelling, when: always}
- {accept: "Control+Shift+J", toggle: new_hide_pinyin, when: always}
- {accept: "Control+Shift+K", toggle: single_char, when: always}
- { when: paging, accept: comma, send: comma } #逗号顶屏
- { when: has_menu, accept: period, send: period } #句号顶屏
- {accept: "Shift+space", toggle: noop, when: always}
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
menu:
page_size: 6