Repository navigation
Expand file tree
/
Copy pathtiger.schema.yaml
More file actions
210 lines (182 loc) · 7.55 KB
/
Copy pathtiger.schema.yaml
File metadata and controls
210 lines (182 loc) · 7.55 KB
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
# Rime schema
# encoding: utf-8
schema:
schema_id: tiger
name: 虎码·单字
icon: ico/tiger.ico # string 方案图标,格式: .ico
version: "2025.07.27"
author:
- 發明人 ID;PeaceB
- Rime schema by zHon
description: |
虎码输入方案
敲 ` 鍵進入双拼反查
dependencies:
- reverse_pinyin # 拼音单字反查
- melt_eng # 英文
- tiger # 虎码
- jde # 简单鹤
- radical_pinyin # 部件拆字
- stroke # 五筆畫
- charset # 字集过滤
__include: config_base:/switches_engine_table # Rime模块
__include: config_base:/opencc_config
__include: config_base:/reverse_config # 反查模块
__include: config_base:/Lua_config # 自定义模块
__include: config_base:/recognizer_config # 识别器模块
# 拼写设定
speller:
alphabet: "zyxwvutsrqponmlkjihgfedcba;/NUO`" # 不直接上屏的标点
# initials: 'abcdefghijklmnopqrstuvwxyz;/ZYXWVUTSRQPONMLKJIHGFEDCBA' # 可以作为第一位的「引导键」
delimiter: "'" # 上屛时的音节间分音符
max_code_length: 4 # 形码最大码长,超过则顶字上屛
auto_select: true #是否开启无重码时自动上屏(仅在编码吻合时判断)
# auto_select_pattern: ^;\w+|^\w{4}$ #自动上屏规则 对 [;] 引导的编码实行候选唯一自动上屏, 若要添加四码上屏功能,在 ^;\w+ 后面 加上 |^\w{4}$ ,以此类推。直接注释禁用则达最大码长后,无重码时自动上屏
auto_select_pattern: ^;(\w+|;)
algebra:
- xform/^\*// # 特码以星号开头,以便在全码后置脚本中区分,以防识别为全码
# 主翻译器
translator:
dictionary: tiger # 挂载词库
enable_charset_filter: false # 字符集过滤(低重形码用不着)
enable_encoder: false # 是否启用 自动造词
enable_sentence: false # 是否启用造句模式
encode_commit_history: false # 是否对已上屛词自动成词
enable_completion: false # 编码提示开关(提前显示尚未输入完整码的字)
enable_user_dict: false # 是否启用用户词典(记录动态字词频、自造词)
# max_phrase_length: 4 #最大自动成词 词长
initial_quality: 3 # 主词库 初始权重应比其他高
comment_format: #提示码自定义
- "xform/~/ /" #去掉编码提示前的~号
# - "xform/^/ /" #提示前面 +间距
# 标点符号
punctuator:
import_preset: symbols # 从 default.yaml 继承通用的
# 快捷键设置
key_binder:
# import_preset: default # 从 default.yaml 继承通用的
# Lua 配置: 以词定字
select_first_character: "Shift+exclam" # 以词定字 shift+1 [(第一个字)
select_last_character: "Shift+at" # 以词定字句号 shift+2 (最后一个字)
custom_bindings:
__append:
# 在這裏添加只在本方案中生效的按鍵綁定
# 打字时,' 选中第3个候选字发送 (音码方案需要此键 分词,形码单独启用)
- { accept: apostrophe, send: 3, when: has_menu}
bindings:
__patch:
- :/key_binder/custom_bindings?
- config_base:/key_config/options_toggle
- config_base:/key_config/tab_Page
- config_base:/key_config/keys
__patch:
# 英文临时输入标识
- 'engine/segmentors/@after 01': affix_segmentor@Eng
# 英文临时输入(E)
- 'engine/translators/@after 02': table_translator@Eng
##################################################
# 临时小鹤双拼标识
- 'engine/segmentors/@after 02': affix_segmentor@double_pinyin_flypy
# 音码翻译器 临时小鹤双拼混输
- 'engine/translators/@after 03': script_translator@double_pinyin_flypy
##################################################
# 中英混合词汇
- 'engine/translators/@after 05': table_translator@cn_en
##################################################
# 反查显示编码的词库
- reverse_lookup_filter/dictionary: tiger
##################################################
# 响应 临时英文输入
- recognizer/patterns/Eng: "^E[A-Z|a-z]*`?$"
# 响应 小鹤双拼临时输入
- recognizer/patterns/double_pinyin_flypy: "^oup([a-z]+'?)*$"
# 响应 单字反查
- recognizer/patterns/reverse_lookup: "^`([a-z]+'?)*$"
# 关闭拼音单字统配反查
- recognizer/patterns/reverse_pinyin_lookup: null
##################################################
# 【重要】读取用户自定义补丁文件
- tiger.custom:/patch?
##################################################
# 英文翻译器
Eng:
tag: Eng
dictionary: melt_eng
enable_completion: true
enable_sentence: false
enable_user_dict: false
prefix: "E"
tips: 〔En〕
comment_format:
- xform/^.+$//
# 次翻译器 小鹤双拼(临时音码混输)
double_pinyin_flypy:
dictionary: pinyin # 挂载词库
prism: jde
enable_encoder: true # 是否启用 自动造词
enable_sentence: true # 是否启用造句模式
encode_commit_history: false # 是否对已上屛词自动成词
enable_completion: false # 编码提示开关(提前显示尚未输入完整码的字)
enable_user_dict: true # 是否启用用户词典(记录动态字词频、自造词)
initial_quality: 10 #初始权重应比其他高
preedit_format: # preedit_format 影响到输入框的显示和“Shift+回车”上屏的字符
__include: flypy_preedit_format
tag: double_pinyin_flypy
prefix: "oup"
tips: "〔双拼〕"
disable_user_dict_for_patterns:
- "^[a-z;,./]$" # 禁止单码字调频
- "^[a-z;,./][a-z;,./]$" # 禁止双码字调频
# 中英混合词汇
cn_en:
dictionary: ""
user_dict: en_dicts/cn_en_tiger
db_class: stabledb
enable_completion: true # 补全提醒
enable_sentence: false # 禁止造句
initial_quality: 0.5
comment_format:
- xform/^.+$//
# 拼音单字反查
reverse_lookup:
dictionary: reverse_pinyin # 拼音单字反查
prefix: "`"
tips: "〔单字〕"
comment_format:
- "xform/^/ /"
##################################################
##################################################
# 将小鹤双拼上屏编码转换为全拼
flypy_preedit_format:
- xform/([bpmfdtnljqx])n/$1iao/
- xform/(\w)g/$1eng/
- xform/(\w)q/$1iu/
- xform/(\w)w/$1ei/
- xform/([dtnlgkhjqxyvuirzcs])r/$1uan/
- xform/(\w)t/$1ve/
- xform/(\w)y/$1un/
- xform/([dtnlgkhvuirzcs])o/$1uo/
- xform/(\w)p/$1ie/
- xform/([jqx])s/$1iong/
- xform/(\w)s/$1ong/
- xform/(\w)d/$1ai/
- xform/(\w)f/$1en/
- xform/(\w)h/$1ang/
- xform/(\w)j/$1an/
- xform/([gkhvuirzcs])k/$1uai/
- xform/(\w)k/$1ing/
- xform/([jqxnl])l/$1iang/
- xform/(\w)l/$1uang/
- xform/(\w)z/$1ou/
- xform/([gkhvuirzcs])x/$1ua/
- xform/(\w)x/$1ia/
- xform/(\w)c/$1ao/
- xform/([dtgkhvuirzcs])v/$1ui/
- xform/(\w)b/$1in/
- xform/(\w)m/$1ian/
- xform/([aoe])\1(\w)/$1$2/
- "xform/(^|[ '])v/$1zh/"
- "xform/(^|[ '])i/$1ch/"
- "xform/(^|[ '])u/$1sh/"
- xform/([jqxy])v/$1u/
- xform/([nl])v/$1ü/