forked from rime/brise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stenotype.schema.yaml
165 lines (158 loc) · 3.77 KB
/
stenotype.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
# Rime schema
# encoding: utf-8
schema:
schema_id: stenotype
name: 打字速記法
version: "1.0"
author:
- 佛振 <[email protected]>
description: |
根據書中記述的一種字母式中文速記改編。
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: simplification
states: [ 漢字, 汉字 ]
- name: ascii_punct
states: [ 。,, ., ]
engine:
processors:
- ascii_composer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- script_translator
filters:
- simplifier
- uniquifier
speller:
alphabet: "zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA-=$@~`'<>,.:\""
delimiter: " _"
algebra:
- erase/^xx$/
- xform/^yu/v/
- xform/^yi?/i/
- xform/^wu?/u/
- xform/([iuv])n$/$1en/
- xform/ui$/uei/
- xform/iu$/iou/
- xform/uo$/,/
- xform/(?<!a)o$/,/
- xform/ing$/I/
- xform/^bi/B/
- xform/^pi/P/
- xform/^mi/M/
- xform/^fei$/F/
- xform/^di/D/
- xform/^ti/T/
- xform/^ni/N/
- xform/^li/L/
- xform/^gu/G/
- xform/^ku/K/
- xform/^hu/H/
- xform/^ju/J/
- xform/^qu/Q/
- xform/^xu/X/
# ① ZCSR = zhu/zu,chu/cu,shu/su,ru
- derive/^([zcs])h/$1/
- xform/^zu/Z/
- xform/^cu/C/
- xform/^su/S/
- xform/^ru/R/
# # ② ZCSR = zh,ch,sh,r; zcsr = z,c,s,er
# - xform/^zh/Z/
# - xform/^ch/C/
# - xform/^sh/S/
# - xform/^r/R/
- xform/^([bpmf])u$/$1/
- xform/^([dtnlgkh])e$/$1/
- xform/^([jqxZCSRzcs])i/$1/
- xform/^er$/r/
- xform/(?<![ae])i$/./
- xform/(?<!o)u$/:/
- "xform/v$/\"/"
- xform/ia$/`/
- xform/ua$/~/
- "xform/a$/'/"
- xform/ie$/</
- xform/ve$/>/
- xform/uai$/@/
- xform/uei$/v/
- xform/ai$/i/
- xform/ei$/e/
- xform/i?ao$/o/
- xform/i?ou$/u/
- xform/ian$/y/
- xform/uan$/w/
- xform/van$/$/
- xform/an$/a/
- xform/ien$/=/
- xform/uen$/U/
- xform/ven$/V/
- xform/en$/-/
- xform/iang$/Y/
- xform/uang$/W/
- xform/ang$/A/
- xform/eng$/E/
- xform/i?ong$/O/
- derive|^([BPMDTNLjqx])a$|\L$1\Ey|
# ① ZCSR = zhu/zu,chu/cu,shu/su,ru
- derive|^([GKHJQXZCSR])a$|\L$1\Ew|
- derive|^([GKHJQXZCSR])-$|\L$1\EU|
- derive|^([GKHZCSR])e$|\L$1\Ev|
# # ② ZCSR = zh,ch,sh,r; zcsr = z,c,s,er
# - derive|^([GKHJQX])a$|\L$1\Ew|
# - derive|^([GKHJQX])-$|\L$1\EU|
# - derive|^([GKH])e$|\L$1\Ev|
translator:
dictionary: luna_pinyin
prism: stenotype
punctuator:
full_shape:
" " : { commit: " " }
";" : [ ",", "。", ":", ";" ]
"/" : [ "、", /, "/" ]
"?" : { commit: ? }
"!" : { commit: ! }
"^" : { commit: …… }
"(" : (
")" : )
"|" : [ ——, ·, |, "¦", "§" ]
"[" : [ 「, 【, 〈, 〔, [ ]
"]" : [ 」, 】, 〉, 〕, ] ]
"{" : [ (, 『, 《, 〖, { ]
"}" : [ ), 』, 》, 〗, } ]
half_shape:
" " : { commit: " " }
";" : [ ",", "。", ":", ";" ]
"/" : [ "、", /, "/" ]
"?" : { commit: ? }
"!" : { commit: ! }
"^" : { commit: …… }
"(" : (
")" : )
"|" : [ ——, ·, "¦", |, "§" ]
"[" : [ 「, 【, 〈, 〔, [ ]
"]" : [ 」, 】, 〉, 〕, ] ]
"{" : [ (, 『, 《, 〖, { ]
"}" : [ ), 』, 》, 〗, } ]
key_binder:
import_preset: default
bindings:
- { when: has_menu, accept: minus, send: minus }
- { when: has_menu, accept: equal, send: equal }
- { when: paging, accept: comma, send: comma }
- { when: has_menu, accept: period, send: period }