This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
forked from boomker/rime-fast-xhup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmelt_eng.schema.yaml
141 lines (132 loc) · 3.01 KB
/
melt_eng.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
# Rime schema
# vim: set sw=2 sts=2 et:
# encoding: utf-8
schema:
schema_id: melt_eng
name: melt_eng
version: "0.2.2"
author:
- Patrick <ipatrickmac@gmail.com>
- tumuyan <tumuyan@21cn.com>
description:
只包含少量常用词汇,方便中英文混合输入度方案调用
engine:
processors:
- lua_processor@*engword_append_space
- ascii_composer
- key_binder
- speller
- recognizer
- selector
- navigator
- express_editor
segmentors:
- matcher
- ascii_segmentor
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- table_translator
- punct_translator
- lua_translator@*word_autocaps*translator
filters:
- lua_filter@*word_autocaps*filter
- uniquifier
speller:
alphabet: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
delimiter: " '"
algebra:
# 拼写规则的本质,是把字典按照规则改写,而不是把输入的按键码转写。
__include: algebra_flypy
algebra_common:
# 数字派生
- derive/1([4-7|9])/$1teen/
- derive/11/eleven/
- derive/12/twelve/
- derive/13/thirteen/
- derive/15/fifteen/
- derive/18/eighteen/
- derive/0/o/ # 如 1000 -> oneooo
- derive/0/O/
- derive/0/zero/
- derive/1/one/
- derive/10/ten/
- derive/2/to/
- derive/2/two/
- derive/3/three/
- derive/4/for/
- derive/4/four/
- derive/5/five/
- derive/6/six/
- derive/7/seven/
- derive/8/eight/
- derive/9/nine/
# 符号派生
- derive/\+/plus/
- derive/\./dot/
- derive/@/at/
- derive/-/hyphen/
- derive/#/hash/
- derive/#/sharp/
# - derive/♯/sharp/
- derive / slash
- derive/&/and/
- derive/%/percent/
# 派生无单个特殊字符的拼写
- derive/[.]//
- derive/[+]//
- derive/[@]//
- derive/[-]//
- derive/[_]//
# 派生无任何非字母数字字符的拼写
- derive/[^a-zA-Z0-9]//
# 禁用非英文、数字开头的编码
- erase/^[^a-zA-Z0-9].+$/
# 全小写
- derive/^.+$/\L$0/
# 全大写
- derive/^.+$/\U$0/
# 首字母大写
- derive/^./\U$0/
# 前 2~10 个字母大写
- derive/^([a-z]{2})/\U$1/
- derive/^([a-z]{3})/\U$1/
- derive/^([a-z]{4})/\U$1/
- derive/^([a-z]{5})/\U$1/
- derive/^([a-z]{6})/\U$1/
- derive/^([a-z]{7})/\U$1/
- derive/^([a-z]{8})/\U$1/
- derive/^([a-z]{9})/\U$1/
- derive/^([a-z]{10})/\U$1/
translator:
dictionary: melt_eng
key_binder:
import_preset: default
punctuator:
import_preset: default
recognizer:
import_preset: default
algebra_flypy:
__include: algebra_common
__append:
- derive/(?<!\d)1([1-9])(?!\d)/ui$1/
- derive/([1-9])0000(?!0)/$1wj/
- derive/([1-9])000(?!0)/$1fm/
- derive/([1-9])00(?!0)/$1bd/
- derive/([2-9])0(?!0)/$1ui/
- derive/(?<!\d)([2-9])([1-9])(?!\d)/$1ui$2/
- derive/0/lk/
- derive/1/wi/
- derive/2/er/
- derive/3/sj/
- derive/4/si/
- derive/5/wu/
- derive/6/lf/
- derive/7/fi/
- derive/8/ba/
- derive/9/jf/
- derive/10/ui/
- derive/#/jk/
- derive/\./dm/
- derive/\+/jx/