-
Notifications
You must be signed in to change notification settings - Fork 9
/
clover.schema.yaml
176 lines (159 loc) · 4.11 KB
/
clover.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
# Rime schema
# encoding: utf-8
schema:
schema_id: clover
name: 🍀四叶草
version: "1.1.0"
author:
- fkxxyz - https://www.fkxxyz.com
- SivanLaai - https://sivanlaai.github.io
description: |
由🍀️四叶草亲自定制,特点:
1. 结合搜狗输入法的输入习惯
2. 默认开启 emoji 表情支持
3. 加上很多特殊符号的输入支持
4. 繁简切换支持
5. 许多智能纠错
由SivanLaai补充:
1. 支持符号输入
2. 支持笔画反查
dependencies:
- emoji
- stroke
switches:
- name: ascii_mode
reset: 0
states: [ 中, 英 ]
- name: full_shape
reset: 0
states: [ 半, 全 ]
- name: zh_simp_s2t
reset: 0
states: [ 简, 繁 ]
- name: ascii_punct
reset: 0
states: [ 。,, ., ]
# - name: symbol_support
# reset: 0
# states: [ "无符", "符" ]
# - name: emoji_suggestion
# reset: 0
# states: [ 😑️, 😁️ ]
- name: show_es
reset: 1
states: [ 😔, 😀 ]
- options: [ _liquid_keyboard ]
states: [ 😂 ]
- options: [ _key_liquid_keyboard_clipboard ]
states: [📝]
# - options: [ _key_VoidSymbol ]
# states: [ " " ] #空格调整▼的位置
- options: [ _key_Hide ]
states: [▼]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- table_translator@custom_phrase
- reverse_lookup_translator
- script_translator
- lua_translator@date_translator # 自定义系统变量输出
- history_translator #输入上次内容
- table_translator@easy_en
filters:
- simplifier@emoji_suggestion
- simplifier@symbol_support
- simplifier
- uniquifier
- simplifier@es_conversion
#符号输入⬆⬇
es_conversion:
opencc_config: es.json
option_name: show_es
simplifier:
option_name: zh_simp_s2t
opencc_config: s2t.json
emoji_suggestion:
opencc_config: emoji.json
option_name: emoji_suggestion
tips: all
symbol_support:
opencc_config: symbol.json
option_name: symbol_support
tips: all
easy_en:
dictionary: "easy_en"
db_class: tabledb
enable_completion: true
enable_sentence: false
initial_quality: 0
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " '"
algebra:
# 基础
- abbrev/^([a-z]).+$/$1/ #简拼可能造成输入卡顿
- abbrev/^([zcs]h).+$/$1/
# 补全
- derive/([dtngkhrzcs])o(u|ng)$/$1o/ # o = ou; o = ong
- derive/ong$/on/ # on = ong
- derive/^ding$/din/ # din = ding
# 处理 v 和 u
- derive/^([nl])ue$/$1ve/ # nve = nue; lve = lue
- derive/^([jqxy])u/$1v/ # v = u; v = u
# 智能纠错
- derive/ao$/oa/ # oa = ao
- derive/([iu])a(o|ng?)$/a$1$2/ # aio = iao; aing = iang; aung = uang
- derive/([aeiou])ng$/$1gn/ # gn = ng
- derive/un$/uen/ # uen = un
- derive/ui$/uei/ # uei = ui
- derive/iu$/iou/ # iou = ui
- derive/tie$/tei/ # tei = tie
- derive/i$/ii/ # ii = i # i 不小心按两下
- derive/u$/uu/ # ui = u # u 不小心按两下
translator:
dictionary: clover
preedit_format:
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
custom_phrase:
dictionary: ""
user_dict: custom_phrase
db_class: stabledb
enable_completion: false
enable_sentence: false
initial_quality: 1
reverse_lookup:
dictionary: stroke
enable_completion: true
prefix: "`"
suffix: "'"
tips: 〔筆畫〕
preedit_format:
- xlit/hspnz/一丨丿丶乙/
comment_format:
- xform/([nl])v/$1ü/
punctuator:
import_preset: symbols
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
punct: '^/([0-9]0?|[A-Za-z]+)$'
reverse_lookup: "`[a-z]*'?$"