forked from zhuangya/rime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
luna_pinyin.custom.yaml
executable file
·88 lines (83 loc) · 3.4 KB
/
luna_pinyin.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
# luna_pinyin.custom.yaml
#
# 補靪功能:將朙月拼音的詞庫修改爲朙月拼音擴充詞庫
#
# 作者:瑾昀 <[email protected]>
#
# 部署位置:
# ~/.config/ibus/rime (Linux)
# ~/Library/Rime (Mac OS)
# %APPDATA%\Rime (Windows)
#
# 於重新部署後生效
#
#
# 注意:本補靪適用於所有朙月拼音系列方案(「朙月拼音」、「朙月拼音·简化字」、「朙月拼音·臺灣正體」、「朙月拼音·語句流」)。
# 只須將本 custom.yaml 的前面名字改爲對應的輸入方案名字然後放入用戶文件夾重新部署即可。如 luna_pinyin_simp.custom.yaml。
# 雙拼用戶請使用 double_pinyin.custom.yaml。
#
#
# 附朙月拼音系列方案與其對應的 id 一覽表:
# 輸入方案 id
# 朙月拼音 luna_pinyin
# 朙月拼音·简化字 luna_pinyin_simp
# 朙月拼音·臺灣正體 luna_pinyin_tw
# 朙月拼音·語句流 luna_pinyin_fluency
#
patch:
switches:
- name: ascii_mode
reset: 0
states: ["中文", "西文"]
- name: full_shape
states: ["半角", "全角"]
- name: simplification
reset: 1
states: [ "漢字", "汉字" ]
- name: ascii_punct
states: ["。,", ".,"]
- options: ["utf8", "gbk", "gb2312"]
reset: 0
states:
- UTF-8
- GBK
- GB2312
engine/filters:
- simplifier
- uniquifier
- charset_filter@gbk # (※3) GBK 过滤
- single_char_filter
- simplifier@emoji_conversion
# 載入朙月拼音擴充詞庫
"translator/dictionary": luna_pinyin.extended
# 改寫拼寫運算,使得含西文的詞彙(位於 luna_pinyin.cn_en.dict.yaml 中)不影響簡拼功能(注意,此功能只適用於朙月拼音系列方案,不適用於各類雙拼方案)
# 本條補靪只在「小狼毫 0.9.30」、「鼠鬚管 0.9.25 」、「Rime-1.2」及更高的版本中起作用。
"speller/algebra/@before 0": xform/^([b-df-hj-np-tv-z])$/$1_/
# # 符号快速输入和部分符号的快速上屏
# punctuator:
# import_preset: symbols
# symbols:
# "/fs": [½, ‰, ¼, ⅓, ⅔, ¾, ⅒ ]
# "/bq": [😂️, 😅️, ☺️, 😱️, 😭️, 😇️, 🙃️, 🤔️, 💊️, 💯️, 👍️, 🙈️, 💩️, 😈️ ]
# "/dn": [⌘, ⌥, ⇧, ⌃, ⎋, ⇪, , ⌫, ⌦, ↩︎, ⏎, ↑, ↓, ←, →, ↖, ↘, ⇟, ⇞]
# "/fh": [ ©, ®, ℗, ℠, ™, ℡, ⓘ, ♂, ♀, ☉, ☊, ☋, ☌, ☍, ☐, ☑︎, ☒, ☜, ☝, ☞, ☟, ✎, ✄, ♲, ♻, ⚐, ⚑, ⚠]
# "/xh": [ *, ×, ✱, ★, ☆, ✩, ✧, ❋, ❊, ❉, ❈, ❅, ✿, ✲]
# "/py": [ ā, á, ǎ, à, ō, ó, ǒ, ò, ê, ê̄, ế, ê̌, ề, ē, é, ě, è, ī, í, ǐ, ì, ū, ú, ǔ, ù, ü, ǖ, ǘ, ǚ, ǜ, ḿ, m̀, ń, ň, ǹ, ẑ, ĉ, ŝ, ŋ ]
# "/pyd": [ Ā, Á, Ǎ, À, Ō, Ó, Ǒ, Ò, Ê, Ê̄, Ế, Ê̌, Ề, Ē, É, Ě, È, Ī, Í, Ǐ, Ì, Ū, Ú, Ǔ, Ù, Ü, Ǖ, Ǘ, Ǚ, Ǜ, Ḿ, M̀, Ń, Ň, Ǹ, Ẑ, Ĉ, Ŝ, Ŋ ]
# half_shape:
# "#": "#"
# "*": "*"
# "`": "`"
# "~": "~"
# "@": "@"
# "=": "="
# "/": ["/", "÷"]
# '\': "、"
# "_" : "──"
# "'": {pair: ["「", "」"]}
# "[": ["【", "["]
# "]": ["】", "]"]
# "$": ["¥", "$", "€", "£", "¢", "¤"]
# "<": ["《", "〈", "«", "<"]
# ">": ["》", "〉", "»", ">"]
# recognizer/patterns/punct: "^/([a-z]+|[0-9]0?)$"