forked from lotem/rime-zhung
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcombo_zhung_kbcon.schema.yaml
200 lines (185 loc) · 5.12 KB
/
combo_zhung_kbcon.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
# Rime schema
# encoding: utf-8
schema:
schema_id: combo_zhung_kbcon
name: 中州羅馬字(並擊·鍵盤控式)
version: "1.2"
author:
- 佛振 <[email protected]>
description: |
並擊輸入老派鄭州話
佈局:
Ln Dt u I o/eo
S Cr Z* Gk i* N E/eo
Z' Fm Bp er yu U E'
H* A*
標「*」的按鍵爲拇指、食指的基準鍵位
E' 是 E 的活用鍵位,只用於組合韻母
組合鍵:
# 組合聲母
BH = p, BF = m, DH = t, DL = n, GH = k,
ZH = zh, CH = ch, SH = sh, ZC = r
Z'FB = v
zh, ch後接i, ü 時自動轉換爲 j, q
E 單獨使用或與 zh,ch,sh 相拼時輸出 eo,其餘爲 e
o 單獨使用時輸出 o,其餘爲 eo
# 組合韻母及活用(同「大衆式」),括弧內爲活用組合
AI = ai, eoI (oI) = ei, AU = au, U (E'U) = ou,
uI = uei, uAI = uai, iU (yuU) = iou, iAU (yuAU) = iao,
N = en, NE = eng, AN = an, ANE = ang,
iN = in, uN = uen, yuN = yun,
iNE = ing, uNE (uIo) = ung, yuNE (yuUE') = iung,
uANE (uAIo) = uang
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: simplification
states: [ 漢字, 汉字 ]
engine:
processors:
- ascii_composer
- chord_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- r10n_translator
filters:
- simplifier
- uniquifier
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " '"
algebra:
- xform/^([A-Za-z]+)\d$/$1/
#- derive/^yi?/i/
#- derive/^wu?/u/
- derive/^wu/vu/
- derive/^([vw])u([in])/$1e$2/
- derive/^([jqx])([^i])/$1i$2/
- derive/ui/uei/
- derive/([iu])n/$1en/
#- derive/^([zcsr]h?)y/$1/
- derive/^rh/r/
- derive/^w(a|au|ang?|en)/v$1/
chord_composer:
alphabet: "gtbfrvdecswxa;njum ki,lo."
algebra:
- 'xlit|gtbfrvdecswxa;njum ki,lo.|gtpzdbclfsczHhLiuVaNIUeOE|'
# 輸出空格,方便雙手交替上字
- 'xform/^h$/ /'
# 以下統一表記爲 h
- xform/Hh?/h/
- xform/^bfz/v/
# 組合聲母
- xform/^bh/p/
- xform/^dh/t/
- xform/^gh/k/
- xform/^fh/v/
- xform/^bf/m/
- xform/^dl/n/
- xform/^zc/rh/
- xform/^zh([iV])/j$1/ # zh 後接 i, ü 時自動轉換爲 j
- xform/^ch([iV])/q$1/ # ch 後接 i, ü 時自動轉換爲 q
# PC 鍵盤組合聲母
- xform/^b[zcsh]+/p/
- xform/^d[zcsh]+/t/
- xform/^g[zcsh]+/k/
# - xform/^[zr][sh]+/zh/
- xform/^csh/ch/
# 兼容大衆式
- xform/^cs/sh/
- xform/^lc/ch/
- xform/^fz/zh/
# 消除多餘的 h
- xform/([^zcs])h/\1/
# g,k,h 接 i/iu 時作 ji/ju, qi/qu, xi/xu
- xform/^g([iV])/j$1/
- xform/^k([iV])/q$1/
- xform/^h([iV])/x$1/
- 'xform/^a$/ /'
- xform/ae$/a/
- xform/^U$/,/
- xform/^E$/./
- xform/(ua?)IO$/$1Ne/
- xform/aI$/ai/
- xform/I[Oe]$/ei/
- xform/uI$/ui/
- xform/^gI$/ji/
- xform/^kI$/qi/
- xform/^hI$/xi/
- xform/I$/i/
- xform/VUE$/VNe/
- xform/V(a?)U$/i$1U/
# - xform/aU$/au/
- xform/a[UO]$/au/ # 兼容大衆式「ㄠ」
- xform/UE?$/ou/
- xform/([aiuV])Ne$/$1ng/
- xform/Ne$/eng/
- xform/([aiuV])N$/$1n/
- xform/N$/en/
- xform/L$/el/
- xform/([iV])O$/iuo/
- xform/uO$/uo/
# - xform/aO$/o/
- xform/^O$/o/
- xform/O$/eo/
- xform/^([zcsr]?h|l)?e$/$1eo/ #僅在此情況下拼作「ㄜ」,其餘作「ㄝ」
- xform/^aE$/e/
- xform/^i(ng?)$/yi$1/
- xform/^i$/yi/
- xform/^i/y/
- xform/^u(i|ng?)$/wu$1/
- xform/^u$/wu/
- xform/^u/w/
- xform/^V/yu/
- xform/V/iu/
- xform/^([jqx])i([aoeu])/$1$2/
- xform/^([zcsr]h)i$/$1y/
- xform/^([zcsr]h)i([aoeu])/$1$2/
- xform/^([zcsr]h)i(ng?)$/$1e$2/
- xlit/VE/ve/
- xform/^([bpmfv])$/$1u/
# - xform/^([dtnl])$/$1i/
- xform/^([dtn])$/$1i/
- xform/^l$/le/ # l 後補全爲更常用的 le
- xform/^([gkh])$/$1eo/
- xform/^([zcsr]h?)$/$1y/
output_format:
- "xform/^([bpmfv])([iu]|i?[ae]|uo|[ae]i|i?[ao]u|[ei]n|i?an|ang|[ei]ng)$/$1$2'/"
- "xform/^([dtnl])(i|i?u|i?[ae]|[eu]o|iu[eo]|[aeu]i|i?[ao]u|i?u?an|[ei]n|i?un|i?ang|[ei]ng|i?ung)$/$1$2'/"
- "xform/^([gkh])(u|u?[ae]|[eu]o|u?ai|[eu]i|[ao]u|u?an|[eu]n|u?ang|[eu]ng)$/$1$2'/"
- "xform/^([jqx]|[zcs]i?)([iu]|u?[ae]|uo|ai|[ao]u|u?an|[iu]n|[aiu]ng)$/$1$2'/"
- "xform/^([zcsr]h?)([yu]|u?[ae]|[eu]o|u?ai|[eu]i|[ao]u|u?an|[eu]n|u?ang|[eu]ng)$/$1$2'/"
- "xform/^(y?)([aeo]|[ae]i|[ao]u|[aeiu]ng?)$/$1$2'/"
- "xform/^(yu|w)([aeo]|[au]i|[au]ng?)$/$1$2'/"
- "xform/^(eo|el|yi|wu|yu)$/$1'/"
- "erase/^([A-Za-z]+)$/"
prompt_format:
- "xform/^(.*)$/[$1]/"
translator:
dictionary: zhung
prism: combo_zhung_kbcon
punctuator:
import_preset: default
half_shape: &punct
':': [ ':', ';' ]
full_shape: *punct
key_binder:
import_preset: default
recognizer:
import_preset: default