forked from lotem/rime-zhung
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzhung_42.schema.yaml
174 lines (165 loc) · 4.76 KB
/
zhung_42.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
# Rime schema
# encoding: utf-8
schema:
schema_id: zhung_42
name: 中州注音法(四十二鍵)
version: "0.4"
author:
- 佛振 <[email protected]>
description: |
老派鄭州話
以注音符號錄入!
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: simplification
states: [ 漢字, 汉字 ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- fluency_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- r10n_translator
filters:
- simplifier
- uniquifier
menu:
alternative_select_keys: "ABCDEFGHIJ"
speller:
alphabet: '1qaz`2wsxedcrfv5tgbyhnujm8ik,9ol.0p;/- 6347'
initials: '1qaz`2wsxedcrfv5tgbyhnujm8ik,9ol.0p;/-'
finals: " 6347"
delimiter: "'"
use_space: true
algebra:
- xform/^yi?/i/
- xform/^wu?/u/
- xform/^([jqx])([^i])/$1i$2/
- xform/ui/uei/
- xform/([iu])n/$1en/
- xform/^zhy?/Z/
- xform/^chy?/C/
- xform/^shy?/S/
- xform/^rhy?/R/
- xform/^([zcs])y/$1/
- xform/iu/Y/
- xform/eo/O/
- xform/ai/I/
- xform/ei/E/
- xform/au/A/
- xform/ou/U/
- xform/ang/K/
- xform/eng/G/
- xform/an/M/
- xform/en/N/
- xform/el/L/
- xform/([aoAU])l/$1L/
- derive/^(u\d?)$/v$1/
- derive/^u([aAMNK])/v$1/
- abbrev/^([bpmfvdtnlgkhjqxZCSRzcs]).+$/$1/
- derive/^([A-Za-z]+)\d$/$1/
- derive/^([jqx])i([A-Za-z])/$1$2/
- derive/[12]$/5/
- 'xlit|bpmfvdtnlgkhjqxZCSRzcsiuYaoOeIEAUMNKGL12345|1qaz`2wsxedcrfv5tgbyhnujm8ik,9ol.0p;/- 6347|'
translator:
dictionary: zhung
prism: zhung_42
preedit_format:
- 'xlit|1qaz`2wsxedcrfv5tgbyhnujm8ik,9ol.0p;/- 6347''|ㄅㄆㄇㄈㄪㄉㄊㄋㄌㄍㄎㄏㄐㄑㄒㄓㄔㄕㄖㄗㄘㄙㄧㄨㄩㄚㄛㄜㄝㄞㄟㄠㄡㄢㄣㄤㄥㄦˉˆˊˋ˙ |'
punctuator:
full_shape:
" " : { commit: " " }
"<" : [ ,, 《, 〈, «, ‹ ]
">" : [ 。, 》, 〉, », › ]
"?" : [ ?, /, "/", ÷ ]
":" : [ :, ; ]
"'" : { pair: [ "‘", "’" ] }
"\"" : { pair: [ "“", "”" ] }
"\\" : [ 、, \, "\\" ]
"|" : [ ·, |, "|", "§", "¦" ]
"~" : [ 〜, "~", ~, 〰 ]
"!" : { commit: ! }
"@" : [ @, "@", ☯ ]
"#" : [ #, "#", ⌘ ]
"%" : [ %, "%", "°", "℃" ]
"$" : [ ¥, "$", "€", "£", "¥", "¢", "¤" ]
"^" : { commit: …… }
"&" : [ &, "&" ]
"*" : [ *, "*", ·, ×, ※, ❂, ・ ]
"(" : (
")" : )
"_" : [ ——, -, "-" ]
"+" : [ +, "+" ]
"=" : [ =, "=" ]
"[" : [ 「, 【, 〔, [ ]
"]" : [ 」, 】, 〕, ] ]
"{" : [ 『, 〖, { ]
"}" : [ 』, 〗, } ]
half_shape:
"<" : [ ,, 《, 〈, «, ‹ ]
">" : [ 。, 》, 〉, », › ]
"?" : [ ?, /, "/", ÷ ]
":" : [ :, ; ]
"'" : { pair: [ "‘", "’" ] }
"\"" : { pair: [ "“", "”" ] }
"\\" : [ 、, "\\", \ ]
"|" : [ ·, "|", |, "§", "¦" ]
"~" : [ "~", "~~", 〜, ~, 〰 ]
"!" : { commit: ! }
"@" : [ "@", @, ☯ ]
"#" : [ "#", #, ⌘ ]
"%" : [ "%", %, "°", "℃" ]
"$" : [ ¥, "$", "€", "£", "¥", "¢", "¤" ]
"^" : { commit: …… }
"&" : [ "&", & ]
"*" : [ "*", *, ·, ×, ※, ❂, ・ ]
"(" : (
")" : )
"_" : [ ——, -, "-" ]
"+" : [ "+", + ]
"=" : [ "=", = ]
"[" : [ 「, 【, 〔, [ ]
"]" : [ 」, 】, 〕, ] ]
"{" : [ 『, 〖, { ]
"}" : [ 』, 〗, } ]
key_binder:
bindings:
# Emacs style
- { when: composing, accept: Control+p, send: Up }
- { when: composing, accept: Control+n, send: Down }
- { when: composing, accept: Control+b, send: Left }
- { when: composing, accept: Control+f, send: Right }
- { when: composing, accept: Control+a, send: Home }
- { when: composing, accept: Control+e, send: End }
- { when: composing, accept: Control+d, send: Delete }
- { when: composing, accept: Control+k, send: Shift+Delete }
- { when: composing, accept: Control+g, send: Escape }
- { when: composing, accept: Alt+v, send: Page_Up }
- { when: composing, accept: Control+v, send: Page_Down }
# commonly used paging keys
- { when: composing, accept: ISO_Left_Tab, send: Page_Up }
- { when: composing, accept: Shift+Tab, send: Page_Up }
- { when: composing, accept: Tab, send: Page_Down }
- { when: paging, accept: minus, send: Page_Up }
- { when: has_menu, accept: equal, send: Page_Down }
recognizer:
patterns:
email: "^[a-z][-_.0-9a-z]*@.*$"
uppercase: "^[A-Z][-_+.'0-9A-Za-z]*$"
url: "^(www[.]|https?:|ftp:|mailto:).*$"