-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy_hong_im.schema.yaml
186 lines (171 loc) · 6.35 KB
/
my_hong_im.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
# Rime schema
# encoding: utf-8
schema:
schema_id: my_hong_im
name: 我的方音
version: "v0.1.0.0"
author:
- 居正中 AlanJui <[email protected]>
description: |
【拼音系統】:類閩拼方案(BP)
【注音編碼】:漢字讀音編碼採「台灣拼音+」(TLPA+)
鍵盤對應:
ㄅ ㄉ 3 2 7 5 . ㄚ ㄞ ㄢ n
ㄆ ㄊ ㄍ ㄐ ㆣ ㄗ ㄧ ㆦ ㆤ ㄣ
ㄇ ㄋ ㄎ ㄑ ㄫ ㄘ ㄨ ㄜ ㄠ ㄤ
ㆠ ㄌ ㄏ ㄒ J ㄙ ㆬ ㆰ ㆲ ㆭ
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:
#--------------------------------------------------------------------------
# 定義【注音符號】編碼及【鍵盤按鍵】對映之【】
#--------------------------------------------------------------------------
- my_bopomofo_libs:/zu_im_hu_ho_pinn_be
translator:
dictionary: tl_ji_khoo_peh_ue
prism: my_hong_im
spelling_hints: 20
always_show_comments: true
initial_quality: 0.75
preedit_format:
#--------------------------------------------------------------------------
# 定義【鍵盤輸入列】
#--------------------------------------------------------------------------
__include: jih_kian
__append:
#------------------------------------------------------
# 按鍵轉調等:將按鍵之輸入轉換成【聲調符號】
#------------------------------------------------------
- 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:/ziann_ping_un_bu
# 【声調】
- my_bopomofo_libs:/ziann_ping_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:
#---------------------------------------------------
# # 使用【:】鍵,輸入【韻母】:ㆲ
# - { when: composing, accept: colon, send: colon }
# - { when: has_menu, accept: colon, send: colon }
#---------------------------------------------------
# 使用【_】鍵,輸入【調號】: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