-
Notifications
You must be signed in to change notification settings - Fork 8
/
cangjie6.schema.yaml
198 lines (180 loc) · 5.12 KB
/
cangjie6.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
# Rime schema
# encoding: utf-8
schema:
name: 蒼頡檢字法
schema_id: cangjie6
version: "0.2"
author:
- 朱邦復先生
- 沈紅蓮女士
description: |
第六代倉頡輸入法
碼表由雪齋、惜緣和crazy4u整理
dependencies:
- luna_pinyin
- jyutping
switches:
- name: extended_charset
states: [ 通用, 增廣 ]
reset: 1
# 默認開啓Unihan全字集
- name: simplification
states: [ 漢字, 汉字 ]
reset: 0
- name: ascii_mode
reset: 0
- name: full_shape
states: [ 半角, 全角 ]
reset: 0
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- affix_segmentor@pinyin
- affix_segmentor@jyutping
- affix_segmentor@pinyin_lookup
- affix_segmentor@jyutping_lookup
- affix_segmentor@reverse_lookup
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- table_translator
- script_translator@pinyin
- script_translator@jyutping
- script_translator@pinyin_lookup
- script_translator@jyutping_lookup
filters:
- simplifier@simplify
- charset_filter@extended_char
- uniquifier
- reverse_lookup_filter@pinyin_reverse_lookup
- reverse_lookup_filter@jyutping_reverse_lookup
simplify:
option_name: simplification
tips: all
tags: [ abc, pinyin, jyutping ]
extended_char:
option_name: extended_charset
tags: [ abc ]
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " '"
translator:
dictionary: &dict
cangjie6.extended
# 若不需鍵詞,請刪去上條中之「.extended」
# 若需簡體詞,请將上條中之「.extended」改爲「.extsimp」
enable_user_dict: true
# 不想自動調頻的話,將上條中「true」改爲「false」
enable_sentence: true
sentence_over_completion: true
enable_encoder: true
# 不想自動組詞〔記錄輸入過的詞,然後變成五碼固定詞〕的話可以把上條中「true」改爲「false」
encode_commit_history: true
max_phrase_length: 5
preedit_format:
- xlit|abcdefghijklmnopqrstuvwxyz|日月金木水火土竹戈十大中一弓人心手口尸廿山女田止卜片|
comment_format:
- xlit|abcdefghijklmnopqrstuvwxyz~|日月金木水火土竹戈十大中一弓人心手口尸廿山女田止卜片・|
initial_quality: 0.75 # 調整該編譯器出字優先度
pinyin:
tag: pinyin
dictionary: luna_pinyin
prefix: P
# 漢語拼音輸入以〔大寫〕「P」引導
suffix: ;
preedit_format: &pinyin
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
tips: 【漢拼】
closing_tips: 【蒼頡】
initial_quality: 0.2 # 調整該編譯器出字優先度
jyutping:
tag: jyutping
dictionary: jyutping
prefix: J
# 粵拼輸入以〔大寫〕「J」引導
suffix: ;
tips: 【粵拼】
closing_tips: 【蒼頡】
initial_quality: 0.1 # 調整該編譯器出字優先度
#abc_segmentor:
# extra_tags: [pinyin, jyutping ]
# 若想蒼頡、漢語拼音、粵拼混用,請啓用以上兩條〔刪去以上兩條爲首之「#」〕
reverse_lookup:
tag: reverse_lookup
prefix: "`"
# 反查引導鍵「`」
suffix: ;
tips: 【反查】
closing_tips: 【蒼頡】
extra_tags:
- pinyin_lookup
- jyutping_lookup
# 若不想在【反查】時加入漢語拼音或粵拼反查,請在上兩條中刪去相應「pinyin_lookup」或「jyutping_lookup」
pinyin_lookup:
tag: pinyin_lookup
prefix: "`P"
# 獨用漢語拼音反查在反查鍵「`」之後再鍵入〔大寫〕「P」
suffix: ;
dictionary: luna_pinyin
preedit_format: *pinyin
tips: 【漢拼反查】
closing_tips: 【蒼頡】
initial_quality: 1 # 調整該編譯器出字優先度
jyutping_lookup:
tag: jyutping_lookup
prefix: "`J"
# 獨用粵拼反查在反查鍵「`」之後再鍵入〔大寫〕「J」
suffix: ;
dictionary: jyutping
tips: 【粵拼反查】
closing_tips: 【蒼頡】
initial_quality: 0.5 # 調整該編譯器出字優先度
pinyin_reverse_lookup:
tags: [ pinyin_lookup ]
dictionary: *dict
overwrite_comment: true # 覆蓋其他提示
comment_format: &comment
- xform/$/〕/
- xform/^/〔/
- xlit|abcdefghijklmnopqrstuvwxyz |日月金木水火土竹戈十大中一弓人心手口尸廿山女田止卜片、|
jyutping_reverse_lookup:
tags: [ jyutping_lookup ]
dictionary: *dict
overwrite_comment: true # 覆蓋其他提示
comment_format: *comment
punctuator:
import_preset: symbols
# 請在這裏更改標點設置,具體範例參照symbols.yaml本節
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
email: ^[a-z][-_.0-9a-z]*@.*$
url: ^(www[.]|https?:|ftp:|mailto:).*$
reverse_lookup: "`[a-z]*;?$"
# 反查引導鍵
pinyin_lookup: "`P[a-z]*;?$"
# 漢語拼音反查引導鍵
jyutping_lookup: "`J[a-z]*;?$"
# 粵拼反查引導鍵
pinyin: (?<!`)P[a-z']*;?$
# 漢語拼音輸入引導鍵
jyutping: (?<!`)J[a-z']*;?$
# 粵拼輸入引導鍵
punct: ^/[0-9]?[a-z]*$
# 以「/」引導特殊符號