-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nguphing.schema.yaml
176 lines (164 loc) · 3.75 KB
/
nguphing.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
# Rime schema
# encoding: utf-8
schema:
schema_id: nguphing
name: 吳語拼音
version: "20240224"
author:
- 山前 <[email protected]>
description: |
* 標準吳語
* R/X/Q 代表平上去
* 拼音反查撳Q,筆畫反查撳X
dependencies:
- luna_pinyin #反查
- stroke
icon: nguphing.ico
switches:
- name: ascii_mode
reset: 0
states: [漢字, 洋文]
- name: full_shape
states: [半角, 全角]
- name: ascii_punct
states: [句讀, 符號]
- name: simplification
states: [正體, 简体]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- affix_segmentor@luna_pinyin
- affix_segmentor@stroke
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- script_translator
- script_translator@luna_pinyin
- table_translator@stroke
filters:
- simplifier
- uniquifier
- reverse_lookup_filter@nguphing_reverse_lookup
speller:
alphabet: "zyxwvutsrqponmlkjihgfedcba"
delimiter: "-';"
algebra:
# xform/ - 改寫(替換,弗共存)
# derive - 衍生(共存,單向模糊音)
# abbrev - 簡拼(出字優先級傍前兩組低)
# fuzz - 略拼(衹用在組詞,弗出單字)
# xlit - 變換(適合大量个一對一變換)
# erase - 刪除
- erase/^xx$/
- erase/^0$/
- "xform/'//"
- xlit|123|rxq|
# c 系後 i 簡寫
- derive/^(c|ch|j|sh|zh)i([aeou])/$1$2/
# in心 星ing 弗分
- derive/ing([rxq])$/in$1/
- derive/in([rxq])$/ing$1/
- derive/ik$/ih/
- derive/ih$/ik/
- derive/eng/en/
# ih立 ieh列 弗分
- derive/ieh$/ih/
# ie淹 iae煙 弗分
- derive/([iy])ae([rxq])$/$1e$2/
- derive/([iy])e([rxq])$/$1ae$2/
# ok樂 uk六 弗分
- derive/ok$/uk/
- derive/uk$/ok/
# ngi-ni 弗分
- derive/^ngi/ni/
# dz-z j-zh 弗分
- derive/^dz/z/
- derive/^j/zh/
# ci-cy 弗分
- derive/^(c|ch|j|sh|zh)i([rxq])$/$1y$2/
- derive/^(c|ch|j|sh|zh)y([rxq])$/$1i$2/
# l m n 清音簡化
- derive/^([lmn])h/$1/
# ghi ghu 兼容
- derive/yi?/ghi/
- derive/wu?/ghu/
# 弗打聲調
- derive/([rxq])$//
- abbrev/^([a-z]).+$/$1/
- abbrev/^([ptkgszc]h).+$/$1/
- abbrev/^(ts|tz|dz|ng).+$/$1/
translator:
dictionary: nguphing
spelling_hints: 5
preedit_format: &tone
- xlit|rxq|123|
- xform/([aeiou])(ng|n|l)([123])/$1$3$2/
- xform/([aeo])([eiu])([123])/$1$3$2/
- xform/a1/ā/
- xform/a2/à/
- xform/a3/á/
- xform/e1/ē/
- xform/e2/è/
- xform/e3/é/
- xform/o1/ō/
- xform/o2/ò/
- xform/o3/ó/
- xform/i1/ī/
- xform/i2/ì/
- xform/i3/í/
- xform/u1/ū/
- xform/u2/ù/
- xform/u3/ú/
- xform/y1/ȳ/
- xform/y2/ỳ/
- xform/y3/ý/
- xform/ng1/n̄g/
- xform/ng2/ǹg/
- xform/ng3/ńg/
- xform/m1/m̄/
- xform/m2/m̀/
- xform/m3/ḿ/
- "xform/[;']/-/"
comment_format: *tone
luna_pinyin:
tag: luna_pinyin
dictionary: luna_pinyin
prefix: "q"
tips: 〔普通話〕
preedit_format:
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
stroke:
tag: stroke
dictionary: stroke
prefix: "x"
tips: 〔筆畫〕
preedit_format:
- xlit/hspnz/一丨丿丶乙/
nguphing_reverse_lookup:
tags: [ luna_pinyin, stroke ]
overwrite_comment: false
dictionary: nguphing
punctuator:
import_preset: symbols_wu
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
punct: "^/([0-9]0?|[A-Za-z]+)$"
luna_pinyin: "^q[a-z']*$"
stroke: "^x[hspnz]*$"