-
Notifications
You must be signed in to change notification settings - Fork 14
/
flypy_xhfast.custom.yaml
151 lines (135 loc) · 5.59 KB
/
flypy_xhfast.custom.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
## 一些常用的设置项, 找到需要进行的设置所在的行,
## 取消注释 (删除行开头的单个 # 符号) 即可启用该设置项.
## 注意不要删除前面的空格, YAML 文件的缩进比较严格, 缩进不对容易报错.
patch:
# 候选菜单
menu/+:
alternative_select_labels: [ ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, ⑨, ⓪ ]
# alternative_select_keys: 1234890 # 候选项选中快捷键
page_size: 7 # 自定义候选项个数
# 候选菜单布局样式
style/+:
horizontal: false # 横向(true)/纵向(默认false)
switches/+:
# - name: prediction
# states: [联想关, 联想开]
# reset: 0
- name: emoji
states: [🈚️, 😄]
reset: 1
- name: extended_charset
states: [通用, 增廣]
reset: 1
- name: charset_comment
states: [码区提示关, 码区提示开]
reset: 0
engine/+:
processors/+:
segmentors/+:
translators/+:
filters/+:
'engine/processors/@before 0': lua_processor@space_leader_word
'engine/filters/@before last': lua_filter@cn_space_en_filter
# 'engine/processors/@before 0': predictor
# "engine/translators/@before 0": predict_translator
key_binder/+:
import_preset: default # 从 default.yaml 继承通用的
# search: "`" # 辅码引导符
pin_cand: "Control+t" # 候选词置顶
drop_cand: "Control+d" # 强制删词, 无视输入的编码
hide_cand: "Control+x" # 匹配当前输入码后隐藏指定的候选字词
turn_down_cand: "Control+j" # 匹配当前输入码后降频指定的候选字词
switch_comment: "Control+n" # 切换注释(小鹤形码 / 带调拼音 / 无)
commit_comment: "Control+p" # 注释上屏
switch_english: "Control+g" # 切换到英文输入方案
expand_abbr_py: "Control+0" # 展开超级简拼
select_first_character: "minus" # `-` 以词定字(第一个字)
select_last_character: "equal" # `=` 以词定字(最后一个字)
bindings/+:
- { when: has_menu, accept: semicolon, send: 2 } # 分号用于第2候选
- { when: has_menu, accept: apostrophe, send: 3 } # 单引号用于第3候选
- { when: paging, accept: comma, send: Page_Up } # 逗号返回上一页
- { when: has_menu, accept: period, send: Page_Down }
- { when: composing, accept: grave, send: "`" } # `键 逐字追加辅码
- { when: composing, accept: Control+i, send: Shift+Left }
- { when: composing, accept: Control+o, send: Shift+Right }
- { when: has_menu, accept: Control+slash, toggle: simplification }
- { when: has_menu, accept: Control+Shift+slash, toggle: emoji }
- { when: has_menu, accept: Control+Shift+comma, toggle: charset_comment }
recognizer/+:
patterns/+:
week: "^/wk$"
time: "^/wt$"
date: "^(/wd|/rq)$"
chinese_lunar: "^/nl$"
switch_options: "^/so$"
history: "^/hs$"
shortcuts: "^/fj[a-z]*$"
flypy_help: "^/(oh|help)$"
flypy_key_help: "^/ok[a-z]*$"
LaTeX: "^/lt(.*)$"
easy_en: "^/oe[a-zA-Z]*$"
chinese_number: "^/cn[0-9.]*$"
radical_lookup: "~[a-z]+$" # ~ 引导部件拆字, 使用小鹤双拼编码
punctuator/+:
full_shape/+:
half_shape/+:
# '"': {pair: ['‘', '’']}
# "'": {pair: ['“', '”']}
# ";": {commit: ";"} ## 取消注释后, 下行添加注释, 以恢复默认分号
";": [";", ";"]
"@":
- "@"
# - "@xxx.com"
- "@gmail.com"
- "@foxmail.com"
- "@outlook.com"
- "@hotmail.com"
- "@qq.com"
- "@163.com"
- "@139.com"
symbols/+:
speller/+:
algebra/+:
- derive/[[]// # 取消注释,间接辅码
## 模糊音:
- derive/^([jqxy])v/$1u/
- derive/^([jqxy])u/$1v/
- derive/^u([h])/s$1/ # uh => sh
- derive/^(i)g/$1f/ # c[h]eng => c[h]en
- derive/^([ypbn])b/$1k/ # in => ing
- derive/^z([^acdefghijklmnsu])/v$1/ # z => zh
- derive/^c([^acdefghijklmsuo])/i$1/ # c => ch
- derive/^s([^abcdefghijklmnu])/u$1/ # s => sh
# - derive/^l(.*)$/n$1/ # l => n
# - derive/^n(.*)$/l$1/ # n => l
# - derive/^v(.*)/z$1/ # zh => z
# - derive/^i(.*)/c$1/ # ch => c
# - derive/^u(.*)/s$1/ # sh => s
# - derive/^([viu])g/$1f/ # [zcs][h]eng => [zcs][h]en
# - derive/^([viu])f/$1g/ # [zcs][h]en => [zcs][h]eng
# - derive/^([typdjxbm])k/$1b/ # ing => in
history: # 上屏历史记录
tips: "上屏历史"
tag: history
prefix: "/hs"
size: 30
history_num_max: 30
initial_quality: 1000
excluded_types: ["punct"]
pin_word: # 词条置顶配置
word_quality: 1000
comment_mark: " 🔝"
excluded_types: ["flypy_key_help", "easy_en", "radical_lookup"]
long_word_up: # 长词升频到第 idx 个位置
idx: 3
excluded_codes: ["date", "rq", "week", "time", "lunar"]
cold_wold_reduce: # 生僻词条降频到第 idx 个位置
idx: 4
excluded_types: ["easy_en"]
emoji_reduce: # Emoji 降频到第 idx 个位置
idx: 6
predictor:
db: predict.db
max_candidates: 2
max_iterations: 2