-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy_Tai_Gi_BoPoMo_Module.schema.yaml
227 lines (214 loc) · 8.15 KB
/
my_Tai_Gi_BoPoMo_Module.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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# Rime schema
# vim: set sw=2 sts=2 et:
# encoding: utf-8
# 台語ㄅㄆㄇ: https://www.youtube.com/watch?v=EEndKSmeG5I&list=PL3-KKGFJdGz0lOJXfmMOZOUpYSC94TJxX&index=1
schema:
schema_id: my_Tai_Gi_BoPoMo_Module
name: 台語ㄅㄆㄇ
version: "v0.1.0.0"
author:
- 居正中 AlanJui <[email protected]>
description: 基於萌典 API 的 RIME 臺語注音輸入法。
【輸入類型】:注音輸入法
【拼音系統】:注音符號改良式
【字典編碼】:台羅音標
【注音輸入】:注音符號(ㄒㄧㄚˉ)
【侯選清單】:〔siaⁿ⁵〕【ㄙㄧㄚˉ】
【聲調標示】:
(1) 台羅八聲調;
(2) 使用數值標示聲調,以利閱讀。
switches:
- name: ascii_mode
reset: 0
states: [漢文, ABC]
- name: full_shape
reset: 0
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:
- echo_translator
- punct_translator
- table_translator@custom_phrase
- script_translator
filters:
- uniquifier
speller:
alphabet: '1q!a2wsxyhnbYHNBedEgcuj8ik,9lUJ*I<(L-M0;Oomp/. 43657'
initials: '1q!a2wsxyhnbYHNBedEgcuj8ik,9lUJ*I<(L-M0;Oomp/.'
finals: ' 43657'
delimiter: "'"
use_space: true
algebra:
__patch:
- my_bopomofo_libs:/zu_im_hu_ho_pinn_be
translator:
dictionary: tl_ji_khoo_peh_ue
prism: my_Tai_Gi_BoPoMo
spelling_hints: 20
always_show_comments: true
initial_quality: 0.75
preedit_format:
#--------------------------------------------------------------------------
# 定義【鍵盤輸入列】
#--------------------------------------------------------------------------
__include: jih_kian
__append:
#==========================================================================
# 【方音符號】對映【台語BoPoMo】
#==========================================================================
# 濁聲母轉換
# - xform/ㆠ/万/ # b
# - xform/ㆣ/兀/ # g
# - xform/ㄫ/⁰兀/ # ng
# - xform/ㆡ/ㄖ/ # j
# - xform/ㆢ/ㄖ/ # ji-
#--------------------------------------------------------------------------
# 鼻音韻母轉換
#--------------------------------------------------------------------------
# 複合鼻音韻母: Nia, Niau, Niu; Nua, Nuai, Nui
- xform/ㄧㆩ/ㄬㄧㄚ/ # iann = Nia
- xform/ㄧㆯ/ㄬㄧㄠ/ # iaunn = Niau
- xform/ㄧㆫ/ㄬㄧㄨ/ # iunn = Niu
- xform/ㄨㆩ/ㄬㄨㄚ/ # uann = Nua
- xform/ㄨㆮ/ㄬㄨㄞ/ # uainn = Nuai
- xform/ㄨㆪ/ㄬㄨㄧ/# uinn = Nui
# 元音/複合鼻音韻母
- xform/ㆪ/ㄬㄧ/
- xform/ㆫ/ㄬㄨ/
- xform/ㆩ/ㄬㄚ/
- xform/ㆧ/ㄬㆦ/
- xform/ㆥ/ㄬㄝ/
- xform/ㆮ/ㄬㄞ/
- xform/ㆯ/ㄬㄠ/
# 鼻化韻符號轉換
- xform/ㄬ//
#--------------------------------------------------------------------------
# 韻母校調
#--------------------------------------------------------------------------
- xform/ㄫ/ㄥ/ # ng-
#
- xform/ㆭ/ㄥ/ # -ng
- xform/ㆲ/ㄛㄥ/ # ong
#
- xform/ㆬ/ㄇ/ # -m
- xform/ㆰ/ㄚㄇ/ # am
- xform/ㆱ/ㄛㄇ/ # om
#
- xform/ㆤ/ㄝ/ # e
- xform/ㆦ/ㄛ/ # oo
#--------------------------------------------------------------------------
# 轉換成聲調符號
#--------------------------------------------------------------------------
- xform/ /ˉ/ # ¹ ˉ 陰平
- xform/6/ˊ/ # ⁵ ˊ 陽平
- xform/4/ˋ/ # ² ˋ 上声
- xform/3/ˇ/ # ³ ˪ 陰去
- xform/5/+/ # ⁷ ˫ 陽去
- xform/7/˙/ # ⁰ ˙ 陰入/陽入:輕聲標點符號表:入声字(陰入/陽入)
#------------------------------------------------------
# 入聲韻尾: ㄅ(p), ㄉ(t), ㄍ(k), ㄏ(h),
#------------------------------------------------------
- xform/ㄅ(˙)/ㆴ$1/ # ㄅ = p
- xform/ㄉ(˙)/ㆵ$1/ # ㄉ = t
- xform/ㄍ(˙)/ㆻ$1/ # ㄍ = k
- xform/ㄏ(˙)/ㆷ$1/ # ㄏ = h
comment_format:
#--------------------------------------------------------------------------
# 定義【候選字清單】
#--------------------------------------------------------------------------
__patch:
# 【候選字單】主體架構
- my_bopomofo_libs:/hau_suan_tuann
#-----------------------------------------
# 右半邊:台語音標-注音
# 【声母】
# - my_bopomofo_libs:/ziann_ping_siann_bu
- my_bopomofo_libs:/Tai_Gi_BoPoMo_siann_bu_tng_uann
# 【韻母】
- my_bopomofo_libs:/ziann_ping_un_bu
# - my_bopomofo_libs:/ziann_ping_un_bu_tng_tai_gi_bopomo
- my_bopomofo_libs:/Tai_Gi_BoPoMo_un_bu_tng_uann
# 【声調】
# - my_bopomofo_libs:/ziann_ping_siann_tiau
- my_bopomofo_libs:/Tai_Gi_BoPoMo_siann_tiau
#-----------------------------------------
# 左半邊:台語音標-拼音
- my_bopomofo_libs:/to_ping_tl
jih_kian:
#--------------------------------------------------------------------------
# 按鍵與方音符號對映
#--------------------------------------------------------------------------
__patch:
- my_bopomofo_libs:/jih_kian_tng_uann
custom_phrase:
dictionary: ""
user_dict: custom_phrase
db_class: stabledb
enable_completion: false
enable_sentence: false
initial_quality: 1
key_binder:
import_preset: default
bindings:
#---------------------------------------------------
# 確保:按鍵 '-' 可當 '漢字拼音' 之第 7 調輸入
#---------------------------------------------------
- { when: has_menu, accept: comma, send: comma } # ㆤ
- { when: has_menu, accept: period, send: period } # ㆲ
- { when: has_menu, accept: minus, send: minus } # n
- { when: composing, accept: minus, send: minus } # 確保 `-` 鍵可用
# - { when: composing, accept: colon, send: colon } # 確保 `:` 鍵可用
# - { when: has_menu, accept: colon, send: colon } # ㆤ
- { when: composing, accept: colon, send: "ㆲ" } # 確保 `:` 鍵可用
- { when: has_menu, accept: colon, send: "ㆲ" } # ㆤ
# - { when: always, accept: colon, send: colon }
#---------------------------------------------------
# 翻頁
#---------------------------------------------------
- { accept: "Control+p", send: Page_Up, when: composing }
- { accept: "Control+n", send: Page_Down, when: composing }
#---------------------------------------------------
# Vim Mode
#---------------------------------------------------
- { when: has_menu, accept: "Control+h", send: Page_Up }
- { when: has_menu, accept: "Control+l", send: Page_Down }
- { when: has_menu, accept: "Control+k", send: Up }
- { when: has_menu, accept: "Control+j", send: Down }
editor:
bindings:
space: commit # 選擇「備選漢字」
Return: commit_composition # 上屏原始的輸入:lau5
Control+Return: commit_script_text # 上屏顯示的輸入:lau⁵ / lâu
Shift+Return: commit_comment # 上屏候選項備注:ㄉㄚ˪〖柳交五〗
Control+Shift+Return: commit_raw_input # 將 Control+Return 綁定到 Lua 函數
menu:
alternative_select_labels: [ ①, ②, ③, ④, ⑤ ] # 修改候選標籤
alternative_select_keys: 12345 #如編碼字符佔用數字鍵則須另設選字鍵
page_size: 5 #選單每䈎顯示個數
style:
horizontal: false
font_face: "霞鶩文楷 TC, 新細明體"
recognizer:
import_preset: default
patterns:
email: ^[a-z][-_.0-9a-z]*@.*$
uppercase: ^[A-Z][-_+.'0-9A-Za-z]*$
url: ^(www[.]|https?:|ftp:|mailto:).*$
punct: '`[^\s]$'
punctuator:
import_preset: keymap_piau_tian