-
Notifications
You must be signed in to change notification settings - Fork 1
/
melt_pinyin.schema.yaml
149 lines (135 loc) · 3.34 KB
/
melt_pinyin.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
# Rime schema
# encoding: utf-8
#
# 融合拼音
# 基于袖珍简化字拼音,袖珍简化字拼音自定义配置等项目
#
# https://github.com/tumuyan/rime-melt
# tumuyan,in 2022.08.16
#
# 部署位置:
# ~/.config/ibus/rime (Linux)
# ~/Library/Rime (Mac OS)
# %APPDATA%\Rime (Windows)
#
# 编辑完后重新部署才会生效
schema:
schema_id: melt_pinyin
name: 融合拼音
version: "1.7"
author:
- tumuyan
description: |
融合了【袖珍简化字拼音】【Rime 简体中文用户定制文件】和【Easy English】从而实现了简体中文和常用英语的混合输入,故名融合拼音。
dependencies:
- melt_eng
keyboard:
label: upcase
layout: qwerty
menu:
page_size: 9
switches:
- name: ascii_mode
reset: 0
states: ["中文", "西文"]
- name: simplification
reset: 0
states: ["简体", "繁體"]
- name: ascii_punct
states: ["。,", ".,"]
- name: comment_pinyin
reset: 0
states: ["滤镜", "拼音"]
engine:
filters:
- "simplifier@candidate_s2t"
- "simplifier@comment_pinyin"
- "lua_filter@autocap_filter"
- "lua_filter@long_word_filter"
- "lua_filter@oo_filter"
- uniquifier
processors:
- "lua_processor@oo_processor"
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- "table_translator@melt_eng"
- punct_translator
- script_translator
- reverse_lookup_translator
- "lua_translator@get_date"
speller:
algebra:
- "abbrev/^([zcs]h).+$/$1/"
- "derive/^([nl])ue$/$1ve/"
- "derive/^([jqxy])u/$1v/"
- "derive/([dtngkhrzcs])o(u|ng)$/$1o/"
- "derive/^([a-z]+)o(u|ng)$/$1o/"
- "derive/ong$/on/"
- "derive/^(.+)$/\\L$1/"
- "abbrev/^_?([a-zA-Z]).*$/$1/"
- "abbrev/^_(.+)$/$1/"
alphabet: "zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA-_="
delimiter: " '"
initials: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
# 翻译器
translator:
dictionary: melt_pinyin
enable_correction: false
preedit_format:
- "xform/([nl])v/$1ü/"
- "xform/([nl])ue/$1üe/"
- "xform/([jqxy])v/$1u/"
melt_eng:
dictionary: melt_eng
enable_completion: true
enable_sentence: false
initial_quality: "-1"
spelling_hints: 9
# 反查
reverse_lookup:
dictionary: liangfen
enable_completion: true
preedit_format: "xlit|v|ü"
prefix: "`"
suffix: "'"
tips: "〔两分〕"
punctuator:
import_preset: symbols
key_binder:
import_preset: default
bindings:
- {accept: minus, send: '-', when: has_menu}
- {accept: equal, send: "=", when: has_menu}
- {accept: "Control+Shift+space", toggle: simplification, when: always}
- {accept: "Control+Shift+P", toggle: comment_pinyin, when: composing}
# 滤镜
candidate_s2t:
opencc_config: s2t.json
option_name: simplification
comment_pinyin:
comment_format:
- "xform/ / /"
opencc_config: pinyin.json
option_name: comment_pinyin
show_in_comment: true
tips: all
recognizer:
import_preset: default
patterns:
email: "^[A-Za-z][-_.0-9A-Za-z]*@.*$"
url: "^(www[.]|https?:|ftp[.:]|mailto:|file:).*$|^[a-z]+[.].+$"
punct: "^/([0-9]+[a-z]*|[a-z]+)$"
reverse_lookup: "`[a-z]*'?$"