-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzu_im_tlpa.schema.yaml
229 lines (216 loc) · 8.1 KB
/
zu_im_tlpa.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
228
229
# Rime schema
# vim: set sw=2 sts=2 et:
# encoding: utf-8
schema:
schema_id: zu_im_tlpa
name: 注音輸入法【台語音標】
version: "v0.1.0.0"
author: 居正中
description: |
【輸入類型】:注音輸入法
【拼音系統】:台語ㄅㄆㄇ
【字典編碼】:台羅音標
【鍵盤輸入】:台語注音符號(ㄒㄧㄚˉ : n.u8<SP>)
【侯選清單】:ㄒ广ㄧㄚˉ
【聲調標示】:
(1) 台羅八聲調;
(2) 使用數值標示聲調,以利閱讀。
dependencies:
- stroke
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
- express_editor
# - fluency_editor
# - fluid_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- table_translator@custom_phrase
- script_translator
filters:
- uniquifier
speller:
alphabet: '1q!a2wsxyhbnedEgcuj8ik,9l0;-UJ*I<(LoM/pm. 43657'
initials: '1q!a2wsxyhbnedEgcuj8ik,9l0;-UJ*I<(LoM/pm.'
finals: ' 43657'
delimiter: "'"
use_space: true
algebra:
__patch:
#--------------------------------------------------------------------------
# 定義【注音符號】編碼及【鍵盤按鍵】對映之【注音編碼】
#--------------------------------------------------------------------------
- lib_zu_im:/zu_im_hu_ho_pinn_be
translator:
dictionary: tl_ji_khoo_peh_ue
prism: zu_im_tlpa
spelling_hints: 20
always_show_comments: true
initial_quality: 0.75
preedit_format:
#--------------------------------------------------------------------------
# 定義【鍵盤輸入列】
#--------------------------------------------------------------------------
__include: jih_kian
__append:
#==========================================================================
# 【方音符號】對映【台語音標-注音】
#==========================================================================
# 濁聲母轉換
- 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:
# 【候選字單】主體架構
- lib_hau_suan_ji_tuann:/hau_suan_tuann
#-----------------------------------------
# 右半邊:台語音標-注音
# 【声母】
# - lib_hau_suan_ji_tuann:/ziann_ping_siann_bu_tlpa
- lib_hau_suan_ji_tuann:/TLPA_BoPoMo_siann_bu_tng_uann
# 【韻母】
- lib_hau_suan_ji_tuann:/ziann_ping_un_bu
# - lib_hau_suan_ji_tuann:/ziann_ping_un_bu_tng_tlpa
- lib_hau_suan_ji_tuann:/TLPA_BoPoMo_un_bu_tng_uann
# 【声調】
- lib_hau_suan_ji_tuann:/TLPA_BoPoMo_siann_tiau
#-----------------------------------------
# 左半邊:台語音標-拼音
- lib_hau_suan_ji_tuann:/to_ping_tlpa
jih_kian:
#--------------------------------------------------------------------------
# 按鍵與方音符號對映
#--------------------------------------------------------------------------
__patch:
- lib_zu_im:/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:
#---------------------------------------------------
# 使用【_】鍵,輸入【調號】:3 (低音調)
- { when: composing, accept: underscore, send: underscore }
- { when: has_menu, accept: underscore, send: underscore }
#---------------------------------------------------
# 使用【-】鍵,輸入【調號】:7 (中音調)
- { when: composing, accept: minus, send: minus }
- { when: has_menu, accept: minus, send: minus }
#---------------------------------------------------
# 使用 【.】鍵,輸入【調號】:0(輕聲及入聲調)
- { when: composing, accept: period, send: period }
- { when: has_menu, accept: period, send: period }
#---------------------------------------------------
# 翻頁
#---------------------------------------------------
- { 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
Shift+Return: commit_script_text # 上屏顯示的輸入:lau⁵ / lâu
Control+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:
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