-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtupa_sp.schema.yaml
204 lines (193 loc) · 4.31 KB
/
tupa_sp.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
201
202
203
204
# Rime schema
# encoding: utf-8
schema:
schema_id: tupa_sp
name: 切韻拼音·三拼
version: "0.1.2"
author:
- 思無邪SyiMyuZya <[email protected]>
- Ayaka Mikazuki <[email protected]>
description: |-
切韻拼音三拼輸入方案測試版
dependencies:
- luna_pinyin
- jyut6ping3
- tupa_unspaced
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: simplification
states: [ 漢字, 汉字 ]
- name: ascii_punct
states: [ 。,, ., ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- affix_segmentor@luna_pinyin
- affix_segmentor@jyut6ping3
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- script_translator
- script_translator@luna_pinyin
- script_translator@jyut6ping3
filters:
- simplifier
- uniquifier
- reverse_lookup_filter@tupa_reverse_lookup
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " '"
algebra:
- xform/^([a-z]*)$/\U$1\E/
# 調整
- xform/^DIH$/DIJH/ # 地
- xform/([IYU])AE(NG[QH]?|K)/$1E$2/ # (w)i/y/uae > (w)i/y/ue
- xform/(RH?)WIE/$1UE/ # 知組
- xform/(RH?)IE/$1YE/
- xform/(RH?)WI/$1UI/
- xform/(RH?)I/$1YI/
- xform/IA(NG[QH]?|K)/YA$1/ # 陽A
# 尾、調
# -*
- xform/IAE([QH]?)$/IEX$1/
- xform/WEONG([QH]?)$/EOX$1/
- xform/WEOK$/EOXK/
- xform/(RH?)UONG([QH]?)$/$1OX$2/
- xform/(RH?)UOK$/$1OXK/
- xform/(RH?)UNG([QH]?)$/$1OUX$2/
- xform/(RH?)UK$/$1OUXK/
- xform/(RH?)YNG([QH]?)/$1YIX$2/
- xform/(RH?)YK/$1YIXK/
- xform/(RH?YA)NG([QH]?)$/$1X$2/
- xform/(RH?YA)K$/$1XK/
- xform/(RH?[YU]O?)([QH]?)$/$1X$2/
- xform/X$/a/
- xform/XQ$/o/
- xform/XH$/p/
- xform/XK$/z/
# -n/j
- xform/N$/e/
- xform/NQ$/r/
- xform/NH$/t/
- xform/T$/w/
- xform/J$/i/
- xform/JQ$/u/
- xform/JH$/y/
# -m/w
- xform/M$/c/
- xform/MQ$/v/
- xform/MH$/b/
- xform/P$/x/
- xform/W$/l/
- xform/WQ$/m/
- xform/WH$/n/
# -ng/0
- xform/NG$/d/
- xform/NGQ$/f/
- xform/NGH$/g/
- xform/K$/s/
- xform/Q$/j/
- xform/H$/h/
- xform/([A-Z])$/$1k/
# 母
- xform/([TDN])J/$1/
- xform/R//
- xform/^PH/o/
- xform/^TH/y/
- xform/^KH/i/
- xform/^TSH/r/
- xform/^NG/u/
- xform/^GH/x/
- xform/^TS/f/
- xform/^DZ/a/
- xform/^SJ/v/
- xform/^ZJ/c/
- xform/^Q/e/
- xform/^([PBMTDNLKGHSZJ])/\l$1/
- xform/^([YU])/w$1/
- derive/^e/q/
# 元音
- xform/OY(.)$/q$1/ # 「怎」
- xform/OI(.)$/q$1/ # 舊版「怎」,已棄用
- xform/UE(.)$/p$1/
- xform/WIE(.)$/o$1/
- xform/YE(.)$/i$1/
- xform/IE(.)$/k$1/
- xform/UI(.)$/q$1/
- xform/WI(.)$/w$1/
- xform/YI(.)$/e$1/
- xform/I(.)$/d$1/
- xform/UA(.)$/z$1/
- xform/YA(.)$/a$1/
- xform/UO(.)$/j$1/
- xform/YO(.)$/u$1/
- xform/OU(.)$/g$1/
- xform/OEU(.)$/n$1/
- xform/U(.)$/f$1/
- xform/Y(.)$/r$1/
- xform/WEE(.)$/x$1/
- xform/EE(.)$/c$1/
- xform/WAE(.)$/b$1/
- xform/AE(.)$/v$1/
- xform/EO(.)$/m$1/
- xform/O(.)$/h$1/
- xform/WE(.)$/y$1/
- xform/E(.)$/l$1/
- xform/WA(.)$/t$1/
- xform/A(.)$/s$1/
translator:
dictionary: tupa
prism: tupa_sp
#db_class: tabledb # 用戶詞典用純文本,測試用
spelling_hints: 8
# TODO preedit_format:
comment_format:
- "xform/$/\u200b/" # 永遠顯示拼音
luna_pinyin:
tag: luna_pinyin
dictionary: luna_pinyin
prefix: "`"
suffix: ";"
tips: 〔普通話〕
preedit_format:
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
jyut6ping3:
tag: jyut6ping3
dictionary: jyut6ping3
prefix: "~"
suffix: ";"
tips: 〔粵語〕
tupa_reverse_lookup:
tags: [ luna_pinyin, jyut6ping3 ]
overwrite_comment: false
dictionary: tupa_unspaced
comment_format:
- xform/=/ /
punctuator:
import_preset: symbols
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
punct: "^/([0-9]0?|[a-z]+)$"
luna_pinyin: "`[a-z]*;?$"
jyut6ping3: "~[a-z]*;?$"