forked from ksqsf/rime-moran
-
Notifications
You must be signed in to change notification settings - Fork 0
/
moran.schema.yaml
188 lines (169 loc) · 4.75 KB
/
moran.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
schema:
schema_id: moran
name: 魔然
version: "0.1"
author:
- 自然碼發明人:周志農
- 方案製作:ksqsf
description: |
爲傳承字設計的自然碼及輔助碼智能整句輸入方案。
dependencies:
- tiger
- moran_fixed
- moran_sentence
- moran_reverse
- moran_english
- moran_japanese
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: simplification
states: [ 漢字, 汉字 ]
- name: ascii_punct
states: [ 。,, ., ]
- name: flexible
states: [ 固詞, 動詞 ] # 「固詞」表示「固頂詞」
reset: 1
- name: emoji
reset: 1
states: [ 🈚, 🈶 ]
- name: unicode_comment
reset: 0
states: [ U開, U關 ]
- name: dzing
reset: 0
states: [ 通, 寍 ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- lua_processor@*moran_launcher # 輸入 omorj 或 ogrwh 後回車打開魔然官網
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- reverse_lookup_translator@reverse_universal
- reverse_lookup_translator@reverse_tiger
- table_translator@custom_phrase # 自定義短語
- table_translator@english # 英語混輸
#- table_translator@japanese # 日語混輸
- lua_translator@*moran_express_translator # 翻譯器
- lua_translator@*moran_shijian # 日期orq 節氣ojq 星期oxq 時間osj
- lua_translator@*moran_number # 數字轉大寫
filters:
- simplifier@emoji
- simplifier
- simplifier@dzing
- lua_filter@*moran_charset_comment_filter # Unicode 區位提示
- lua_filter@*moran_unicode_display_filter # Unicode 編碼提示
- uniquifier
speller:
alphabet: abcdefghijklmnopqrstuvwxyz
delimiter: " '"
algebra:
- derive/^(\w*);(\w)(\w)$/$1$2$3o/ # 全碼 YYXXo
- abbrev/^(\w*);(\w)(\w)$/$1$2$3/ # 全碼 YYXX,優先級更低
- abbrev/^(\w*);(\w)(\w)$/$1$2/ # 構詞可以用 YYX
- abbev/^(\w*);(\w)(\w)$/$1/ # 構詞可以用 YY
#- abbrev/^([a-z]).+$/$1/ # 首字母簡拼(※ 嚴重影響出字速度,在簡詞完善後可能關閉)
ascii_composer:
switch_key:
Shift_L: commit_code
translator: # 整句輸入模式設置,在 top_translator 中被調用
dictionary: moran.extended
prism: moran
initial_quality: 5
enable_commit_history: true
contextual_suggestions: true
max_homophones: 7
fixed: # 固頂輸入模式設置,在 top_translator 中被調用
initial_quality: 10
dictionary: moran_fixed
enable_completion: false
enable_sentence: false
enable_user_dict: false
enable_encoder: false
encode_commit_history: true
custom_phrase: # 自定義短語
dictionary: ""
user_dict: moran.custom
db_class: stabledb
enable_completion: false
enable_sentence: false
initial_quality: 15
english:
dictionary: moran_english
enable_completion: true
enable_sentence: false
enable_user_dict: true
initial_quality: 1
enable_encoder: false
encode_commit_history: false
comment_format:
- xform/.*//
japanese:
dictionary: moran_japanese
enable_completion: false
enable_sentence: true
enable_user_dict: true
initial_quality: 0
enable_encoder: false
encode_commit_history: false
emoji:
opencc_config: moran_emoji.json
option_name: emoji
tips: all
dzing:
opencc_config: moran_dzing.json
option_name: dzing
tips: all
reverse_tiger:
tag: reverse_tiger
dictionary: tiger
enable_completion: true
prefix: "`"
tips: 〔虎碼〕
reverse_universal:
tag: reverse_universal
dictionary: moran.main
tips: 〔通配〕
reverse_lookup:
extra_tags:
- reverse_tiger
- reverse_universal
punctuator:
import_preset: symbols
key_binder:
import_preset: default
bindings:
- {when: has_menu, accept: "Control+s", toggle: simplification}
- {when: has_menu, accept: "Control+u", toggle: unicode_comment}
- {when: has_menu, accept: "Control+q", toggle: emoji} # q 表示表情,讓出 Ctrl+e
- {when: has_menu, accept: "Control+d", toggle: dzing}
- {when: has_menu, accept: semicolon, send: "2"}
- {when: has_menu, accept: "Tab", send: "Control+Right"}
- {when: composing, accept: "Tab", send: "Control+Right"}
recognizer:
import_preset: default
patterns:
reverse_universal: "^(``[a-z][a-z]?|[a-z][a-z]`[a-z`]?|[a-z][a-z][a-z`]?`)$"
reverse_tiger: "^`[^`]*$"
punct: '^/([0-9]0?|[A-Za-z]+)$'
__patch:
- moran.custom.yaml:/patch?
- moran_patches.yaml:/fix_opencc_t2s?
grammar:
language: zh-hant-t-essay-bgw