This repository was archived by the owner on Feb 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwugniu_laupha.schema.yaml
More file actions
204 lines (189 loc) · 5.28 KB
/
Copy pathwugniu_laupha.schema.yaml
File metadata and controls
204 lines (189 loc) · 5.28 KB
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: wugniu_laupha
name: 上海吳語(老派)學堂式吳語拼音
version: "0.1.10"
author:
- 碼表製作:上海閒話abc <tzyyiggnih@yahoo.com.cn>
- 碼表製作:吳語越音 <zhufya@mail.ustc.edu.cn>
- 方案修改:Electric Sheep <shinzoqchiuq@outlook.com>
description: |
上海言話(老派)
拼寫方案採用學堂式吳語拼音
本方案依賴於
- 上海吳語輸入方案 ℞ wugniu
https://github.com/shinzoqchiuq/rime-wugniu_ghoqdaon/
dependencies:
- luna_pinyin
- stroke
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: simplification
reset: 1
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 # 自定義tag luna_pinyin
- affix_segmentor@stroke # 自定義tag stroke
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- script_translator # 主翻譯器
- script_translator@luna_pinyin # 用於反查的luna_pinyin翻譯器
- table_translator@stroke # 用於反查的stroke翻譯器
filters:
- simplifier
- uniquifier
- reverse_lookup_filter@reverse_lookup # 反查濾鏡
speller:
alphabet: abcdefghijklmnopqrstuvwxyz
delimiter: " '"
algebra:
- xform/^([bcdfghjklpqstvwxyz])$/$1_/
# 轉換爲學堂式吳語拼音
- xform/ts/tsh/
- xform/tz/ts/
- xform/dj/j/
- xform/x/sh/
- xform/r/gh/
- xform/o$/oa/
- xform/au/o/
- xform/oa/au/
- xform/eu/eo/
- xform/oe/eu/
- xform/eo/oe/
- xform/aq/aeq/
- xform/aoq/aq/
- xform/i$/ie/
- xform/ij/i/
- xform/el/er/
# 兼容吳語協會式拼音
- derive/q/h/
- derive/gni(?=[nqh]|\d|\b)/nyi/
- derive/gni(?=[aoue])/ny/
- derive/er/r/
# 模糊音
# 模糊“從”“邪”
- derive/dz/z/
# 模糊前後aq
- derive/aeq/aq/
# 模糊“蘭”“雷”
- derive/ae$/e/
# 模糊分尖團音
- derive/ts(h?)i/c$1i/
- derive/dzi/ji/
- derive/^(s|z)i/$1hi/
# 模糊“書”“詩”
- derive/(?<=[szh])yu/y/
# 模糊“煙”“衣”
- derive/ie$/i/
# 模糊前後an
- derive/aon/an/
# 清鼻邊音
- derive/([mnl])h/$1/
- derive/kn/gn/
- derive/nk/ng/
# 容錯 gn => n kn => nh
- derive/gni/ni/
- derive/kni/nhi/
# 簡拼
- abbrev/^([a-z]).+$/$1/
- abbrev/^([pmtnlszckg]h|[kg]n|n[kg]|tsh?|dz).+$/$1/
# 容錯 au => ao
- derive/au/ao/
# c組聲母後自動加i
- derive/^(c|j|gn|kn|[csz]h)i(?=[aoue])/$1/
# 容錯 介音、主元音順序調換
- derive/([iu])([aeou])([euonqh])$/$2$1$3/
# 容錯 oe => eo
- derive/oe/eo/
# 容錯 ao => oa
- derive/ao/oa/
# 容錯 ae => ea
- derive/ae/ea/
# 容錯 y => ghi
- derive/yi|y(?=[aeou])/ghi/
# 容錯 w => ghu
- derive/wu|w(?=[aeo])/ghu/
# 主翻譯器
translator:
dictionary: wugniu_lopha # 調取詞典wugniu_lopha
prism: wugniu_laupha # 根據拼寫運算生成棱鏡文件wugniu_laupha
spelling_hints: 5 # 標註拼音
comment_format: &comment
# 轉換爲學堂式吳語拼音
- xform/ts/tsh/
- xform/tz/ts/
- xform/dj/j/
- xform/x/sh/
- xform/nk/ngh/
- xform/r/gh/
- xform/o\b/oa/
- xform/au/o/
- xform/oa/au/
- xform/eu/eo/
- xform/oe/eu/
- xform/eo/oe/
- xform/i\b/ie/
- xform/ij/i/
- xform/el/er/
# 副翻譯器1 朙月拼音
luna_pinyin:
tag: luna_pinyin
dictionary: luna_pinyin # 調取詞典luna_pinyin
enable_user_dict: false # 關閉用戶詞典
prefix: '`' # 引導鍵「`」
suffix: "'" # 結束鍵「'」
tips: 〔拼音〕 # 輸入前提示〔拼音〕
closing_tips: 〔上海吳語(老派)〕
preedit_format:
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
# 副翻譯器2 五筆畫
stroke:
tag: stroke
dictionary: stroke # 調取詞典stroke
enable_user_dict: false # 關閉用戶詞典
prefix: 'x' # 引導鍵「x」
suffix: "'" # 結束鍵「'」
tips: 〔筆畫〕 # 輸入前提示〔筆畫〕
closing_tips: 〔上海吳語(老派)〕
preedit_format:
- xlit/hspnz/一丨丿丶乙/
# 反查濾鏡
reverse_lookup:
tags: [luna_pinyin, stroke] # 掛在翻譯器luna_pinyin和stroke上
overwrite_comment: true # 覆蓋其他提示
dictionary: wugniu_lopha # 反查所得爲上海吳語
comment_format: *comment
punctuator:
import_preset: symbols # 句讀處理器,統一從外部導入
key_binder:
import_preset: default # 快捷鍵,統一從外部導入
recognizer:
import_preset: default # 特殊規則輸入碼,統一從外部導入
patterns:
punct: "^/([0-9]|10|[A-Za-z]+)$" # 按 / 輸入符號
luna_pinyin: "`[a-z]*'?$" # 按 ` 使用拼音反查,按 ' 結束
stroke: "x[hspnz]*'?$" # 按 x 使用筆畫反查,按 ' 結束