-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcangjie6liu_ext.schema.yaml
194 lines (170 loc) · 5.18 KB
/
cangjie6liu_ext.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
# Rime schema
# encoding: utf-8
schema:
name: 舞蒼檢字-詞
schema_id: cangjie6liu_ext
version: "0.2"
author:
- 朱邦復先生
- 沈紅蓮女士
description: |
第六代倉頡輸入法
碼表由雪齋、惜緣和crazy4u整理
dependencies:
- luna_pinyin
#- cangjie5liu
#- jyutping
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " "
algebra:
#
#- derive/^([^z]).{1}([a-z;,])$/$1$2\?/ # 取首尾二碼爲反查三碼字
#- derive/^([^z]).{2}([a-z;,])$/$1$2\?\?/ # 取首尾二碼爲速成碼反查四碼字
#- derive/^([^z]).{3}([a-z;,])$/$1$2\?\?\?/ # 取首尾二碼爲速成碼反查五碼字
translator: &main_tran
#tag: main_tran
dictionary: &dict cangjie6liu.extended
#prism: *dict
tips: &dict_tips "【舞蒼六-詞】"
closing_tips: &dict_ctips "【舞蒼六-詞】"
suffix: "'"
preedit_format: &dict_pre_fmt
- derive/^(.+)$/\1(\U\1\)\E/
- &dict_pre_xlit xlit|DMATWFYZLJXIEKBHSOCRUGQNPV|日月金木水火土竹戈十大中一弓人心手口尸廿山女田止卜片|
comment_format: &dict_comm_fmt
- xform/^(.+)$/ \1 /
- &dict_comm_xlit xlit|dmatwfyzljxiekbhsocrugqnpv~|日月金木水火土竹戈十大中一弓人心手口尸廿山女田止卜片~|
disable_user_dict_for_patterns:
- "^z.*$"
- "^yyy.*$"
max_phrase_length: 5
enable_charset_filter: false
enable_encoder: false
enable_sentence: false
enable_user_dict: false
enable_completion: true
#----------------------------------------------------
# 所有副字典 反查 (笫一層) 分發至指定副字典(extra_tags)
lookup:
tag: lookup
extra_tags: [ pinyin ,vcode ]
prefix: "`"
tips: "[反查]"
vcode: #提供 以主字典反查副字典 extra_tags
tag: vcode
prefix: "`V"
dictionary: &vdict cangjie6liu
prism: *vdict
tips: *dict_tips
preedit_format: &vdict_pre_fmt
- derive/^(.+)$/\1(\U\1\)\Evcode/
- xform/\((.)(.)(.+)\)/(\1\3\2)/
- *dict_pre_xlit
#- xlit|DMATWFYZLJXIEKBHSOCRUGQNPV[];,|日月金木水火土竹戈十大中一弓人心手口尸廿山女田糸卜魚左右虫羊|
comment_format: *dict_comm_fmt
reverse_lookup: # reverse_lookup filter
tags: [ vcode, lookup,pinyin ]
tag: reverse_lookupa
dictionary: *dict
overwrite_comment: true # 覆蓋其他提示
comment_format: #*rcomment
- xlit|?~|?~|
- xform/^(.+)$/〔\1〕-/
- *dict_comm_xlit
#
pinyin: &pinyin
tag: pinyin
dictionary: &pinyin_dict
luna_pinyin
tips: &pinyin_tips
"[拼音]"
closing_tips: &pinyin_ctips
"[拼音]"
prefix: "`P"
preedit_format: &pinyin_pre_fmt
- "xform/([nl])v/$1ü/"
- "xform/([nl])ue/$1üe/"
- "xform/([jqxy])v/$1u/"
- xform/$/(拼)
comment_format: &pinyin_comm_fmt
- xform/^(.*)$/[\1]拼/
# 反查拼音
lookup_pinyin: # 反查拼音碼 進入點 extra_tag to vcode
tag: lookup_pinyin
extra_tags: [vcode]
prefix: "P"
#suffix: "P"
tips: "[反查拼音]"
closing_tips: "[反查拼音]"
preedit_format: *dict_pre_fmt
reverse_lookup_pinyin: # filter 反查拼音碼
tags: [ lookup_pinyin ]
dictionary: *pinyin_dict
overwrite_comment: true
comment_format: *pinyin_comm_fmt
#----------------------------------------------------
recognizer:
import_preset: default
patterns:
#pinyin: "^P[a-z]*'?$"
lookup: "`[a-z,;?]*'?$|[a-z,;?]+`$" # 第一級
vcode: "`V[^z]*'?$|^[a-z,;]{2}[?]+$"
pinyin: "`P[a-z ]*'?$" #第二級
# 主字典反查 副字典
lookup_pinyin: "^P[a-z;,?]*'?$"
punctuator:
import_preset: symbols
# 請在這裏更改標點設置,具體範例參照symbols.yaml本節
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:
filters:
- single_char_filter
- simplifier
- uniquifier
- reverse_lookup_filter@reverse_lookup # 轉 主字典碼以 tags 選
- reverse_lookup_filter@reverse_lookup_pinyin # 轉 主字典碼以 tags 選
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- affix_segmentor@vcode # 1 tag -extrato-> pinyin_lookup .....
- affix_segmentor@lookup # 1 tag -extrato-> pinyin_lookup .....
- affix_segmentor@pinyin # 1 tag -extrato-> pinyin_lookup .....
- affix_segmentor@lookup_pinyin # 1 tag -extrato-> pinyin_lookup .....
- affix_segmentor@reverse_lookup_pinyin # 1 tag -extrato-> pinyin_lookup .....
- punct_segmentor
- fallback_segment
translators:
- punct_translator
- table_translator
- table_translator@vcode
- script_translator@pinyin
simplify:
option_name: simplification
tips: all
tags: [ abc, pinyin, jyutping ]
extended_char:
option_name: extended_charset
tags: [ abc ]