-
Notifications
You must be signed in to change notification settings - Fork 1
/
luna_pinyin_minti.schema.yaml
executable file
·154 lines (143 loc) · 4.2 KB
/
luna_pinyin_minti.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
# Rime schema
# encoding: utf-8
schema:
schema_id: luna_pinyin_minti
name: 明月拼音-定制版
version: "1.10"
author:
- mintimate < @Mintimate|https://www.mintimate.cn >
description: |
Mintimate的明月拼音方案。
除了参考官方明月拼音,还参考:
* chenhe: https://chenhe.me
* rime wiki: https://github.com/rime/home/wiki
* Chewing - 新酷音
* opencc - 開放中文轉換
dependencies: # 参考 https://github.com/MaxChang3/rime-chaizi
- wubi86_jidian
- stroke
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 英文 ]
- name: emoji_suggestion
reset: 1
states: [ "😣️","😁️"]
- name: full_shape
states: [ 半角, 全角 ]
- name: simplification
reset: 1
states: [ 繁体, 简体 ]
- name: ascii_punct
states: [ 。,, ., ]
engine:
processors:
- ascii_composer # ※ 處理西文模式及中西文切換
- recognizer # ※ 與 matcher 搭配,處理符合特定規則的輸入碼,如網址、反查等
- key_binder # ※ 在特定條件下將按鍵綁定到其他按鍵,如重定義逗號、句號爲候選翻頁鍵
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor # 標識西文段落
- matcher # 標識符合特定規則的段落,如網址、反查等
- affix_segmentor@wubi86_jidian
- affix_segmentor@stroke
- abc_segmentor # 標識常規的文字段落
- punct_segmentor # 標識句讀段落
- fallback_segmentor # 標識其他未標識段落
translators:
- lua_translator@date_translator # 日期Lua
- lua_translator@time_translator # 时间Lua
- lua_translator@week_translator # 星期Lua
- lua_translator@easy_en_translator # 输入截断
- echo_translator # ※ 沒有其他候選字時,回顯輸入碼
- punct_translator # ※ 轉換標點符號
- table_translator@wubi86_jidian
- table_translator@stroke
- reverse_lookup_translator
- script_translator
filters:
- simplifier@emoji_suggestion
- simplifier@zh_simp # 简体
- simplifier
- uniquifier
# Emoji模块
emoji_suggestion:
opencc_config: emoji.json
option_name: emoji_suggestion
translator:
# 字典文件
dictionary: custom_dict.all
preedit_format:
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
speller:
# 拼写匹配
algebra:
- erase/^xx$/ # 首选保留
- derive/^([zcs])h/$1/ # zh, ch, sh => z, c, s
- derive/^([zcs])([^h])/$1h$2/ # z, c, s => zh, ch, sh
- derive/([aei])n$/$1ng/ # en => eng, in => ing
- derive/([aei])ng$/$1n/ # eng => en, ing => in
- derive/([iu])an$/$lang/ # ian => iang, uan => uang
- derive/([iu])ang$/$lan/ # iang => ian, uang => uan
- derive/([aeiou])ng$/$1gn/ # dagn => dang
- derive/([dtngkhrzcs])o(u|ng)$/$1o/ # zho => zhong|zhou
- derive/ong$/on/ # zhonguo => zhong guo
- derive/ao$/oa/ # hoa => hao
- derive/([iu])a(o|ng?)$/a$1$2/ # tain => tian
- abbrev/^([a-z]).+$/$1/ #简拼(首字母)
- abbrev/^([zcs]h).+$/$1/ #简拼(zh, ch, sh)
wubi86_jidian:
tag: wubi86_jidian
dictionary: wubi86_jidian
enable_user_dict: false
enable_completion: true
prefix: "`"
suffix: "'"
tips: 〔五笔〕
stroke:
tag: stroke
dictionary: stroke
enable_user_dict: false
prefix: 'i'
suffix: "'"
tips: 〔笔画〕
preedit_format:
- xlit/hspnz/一丨丿丶乙/
reverse_lookup:
tags: [wubi86_jidian,stroke]
overwrite_comment: true
dictionary: luna_pinyin
punctuator:
import_preset: symbols
# 定义部分半角字符
half_shape:
"#": "#"
"*": "*"
'.' : ["。"]
"`": "`"
"~": "~"
"@": "@"
"=": "="
"/": ["/", "÷",]
'\': "、"
"_" : "──"
"'": {pair: ["「", "」"]}
"[": ["【", "["]
"]": ["】", "]"]
"$": ["¥", "$", "€", "£", "¢", "¤"]
"<": ["《", "〈", "«", "<"]
">": ["》", "〉", "»", ">"]
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
punct: "^/([0-9]0?|[a-z]+)$"
wubi86_jidian: "`[a-z]*'?$"
stroke: "i[a-z]*'?$"