-
Notifications
You must be signed in to change notification settings - Fork 0
/
luna_pinyin_simp.custom.yaml
129 lines (112 loc) · 4.92 KB
/
luna_pinyin_simp.custom.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
patch:
switches:
- name: ascii_mode
reset: 0
states: ["中文", "西文"]
- name: full_shape
states: ["半角", "全角"]
- name: zh_simp # 繁简转换
reset: 1
states: ["漢字", "汉字"]
- options: ["utf8", "gbk", "gb2312"] # 字符集选单
reset: 0 # 默认 UTF8
states:
- UTF-8
- GBK
- GB2312
- name: show_emoji
reset: 1
states: [ "🈚️️\uFE0E", "🈶️️\uFE0F" ]
simplifier:
option_name: zh_simp
engine/filters:
- simplifier
- simplifier@emoji_conversion
- uniquifier
- charset_filter@gbk # GBK 过滤
- single_char_filter
emoji_conversion:
opencc_config: emoji.json
option_name: show_emoji
tags: abc
# 改写拼写运算,使得含西文的词汇(luna_pinyin.cn_en.dict.yaml)不影响简拼功能
"speller/algebra/@before 0": xform/^([b-df-hj-np-tv-z])$/$1_/
# 载入朙月拼音扩充词库
"translator/dictionary": luna_pinyin.extended
# 拼写纠错(不建议开启)
# "translator/enable_correction": true
# 加载easy_en依赖
"schema/dependencies/@1": easy_en
# 载入翻译英文的码表翻译器,取名为 english
"engine/translators/@4": table_translator@english
# english翻译器的设定项
english:
dictionary: easy_en
spelling_hints: 9
enable_completion: false # 是否启用英文输入联想补全
enable_sentence: false
initial_quality: -4 # 调整英文候选词的位置,如 -3 会更靠后
# 符号快速输入和部分符号的快速上屏
punctuator:
import_preset: symbols
symbols:
"/fs": [½, ‰, ¼, ⅓, ⅔, ¾, ⅒ ]
"/xh": [ *, ×, ✱, ★, ☆, ✩, ✧, ❋, ❊, ❉, ❈, ❅, ✿, ✲]
"/dq": [🌍,🌎,🌏,🌐,🌑,🌒,🌓,🌔,🌕,🌖,🌗,🌘,🌙,🌚,🌛,🌜,🌝,🌞,⭐,🌟,🌠,⛅,⚡,❄,🔥,💧,🌊]
"/sg": [🍇,🍈,🍉,🍊,🍋,🍌,🍍,🍎,🍏,🍐,🍑,🍒,🍓,🍅,🍆,🌽,🍄,🌰,🍞,🍖,🍗,🍔,🍟,🍕,🍳,🍲,🍱,🍘,🍙,🍚,🍛,🍜,🍝,🍠,🍢,🍣,🍤,🍥,🍡,🍦,🍧,🍨,🍩,🍪,🎂,🍰,🍫,🍬,🍭,🍮,🍯,🍼,🍵,🍶,🍷,🍸,🍹,🍺,🍻,🍴]
"/dw": [🙈,🙉,🙊,🐵,🐮,🐒,🐶,🐕,🐩,🐺,🐱,😺,😸,😹,😻,😼,😽,🙀,😿,😾,🐈,🐯,🐅,🐆,🐴,🐎,🐂,🐃,🐄,🐷,🐖,🐗,🐽,🐏,🐑,🐐,🐪,🐫,🐘,🐭,🐁,🐀,🐹,🐰,🐇,🐻,🐨,🐼,🐾,🐔,🐓,🐣,🐤,🐥,🐦,🐧,🐸,🐊,🐢,🐍,🐲,🐉,🐳,🐋,🐬,🐟,🐠,🐡,🐙,🐚,🐌,🐛,🐜,🐝,🐞,🦋]
"/bq": [😅,😢,😭,😂,😊,😰,😱,😇,😀,😎,😁,😡,😃,😥,😄,😆,😉,😋,😍,😘,😗,😙,😚,😐,😑,😶,😏,😣,😮,😯,😪,😫,😴,😌,😛,😜,😝,😒,😓,😔,😕,😲,😷,😖,😞,😟,😤,😦,😧,😨,😬,😳,😵,😠]
"/ss": [👈,👉,👆,👇,✋,🙏,👌,👍,👎,✊,👊,👋,👏,👐,💪,🫵,✌️]
half_shape:
"#": "#"
"*": "*"
"`": "`"
"~": "~"
"@": "@"
"=": "="
'\': "、"
"/": "/"
"'": { pair: ["「", "」"] }
"[": "【"
"]": "】"
"<": "《"
">": "》"
"*": "*"
"|": "|"
# ",": [",", ","]
# ".": [".", "。"]
";": ";"
"!": "!"
"(": "("
")": ")"
"\"": "\""
recognizer/patterns/punct: "^/([a-z]+|[0-9]0?)$"
# 模糊拼音
#'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/^n/l/ # n => l
#- derive/^l/n/ # l => n
# 這兩組一般是單向的
#- derive/^r/l/ # r => l
#- derive/^ren/yin/ # ren => yin, reng => ying
#- derive/^r/y/ # r => y
# 下面 hu <=> f 這組寫法複雜一些,分情況討論
#- derive/^hu$/fu/ # hu => fu
#- derive/^hong$/feng/ # hong => feng
#- derive/^hu([in])$/fe$1/ # hui => fei, hun => fen
#- derive/^hu([ao])/f$1/ # hua => fa, ...
#- derive/^fu$/hu/ # fu => hu
#- derive/^feng$/hong/ # feng => hong
#- derive/^fe([in])$/hu$1/ # fei => hui, fen => hun
#- derive/^f([ao])/hu$1/ # fa => hua, ...
# 韻母部份
#- derive/^([bpmf])eng$/$1ong/ # meng = mong, ...
#- derive/([ei])n$/$1ng/ # en => eng, in => ing
#- derive/([ei])ng$/$1n/ # eng => en, ing => in
# librime-lua 输入动态时间和日期
"engine/translators/@6": lua_translator@date_translator
"engine/translators/@7": lua_translator@time_translator