-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcombo_jyutping.schema.yaml
118 lines (109 loc) · 2.63 KB
/
combo_jyutping.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
# Rime schema
# encoding: utf-8
schema:
schema_id: combo_jyutping
name: 宮保粤拼
author:
- 东南西北
- Chingyat (Lince) <[email protected]>
version: "0.0.1"
description: |
並擊輸入粤音
https://zhuanlan.zhihu.com/p/34049407?group_id=952115850191392768
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: simplification
states: [ 漢字, 汉字 ]
- name: ascii_punct
states: [ 。,, ., ]
engine:
processors:
- ascii_composer
- recognizer
- chord_composer # 實現並擊按鍵處理
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- script_translator
filters:
- simplifier
- uniquifier
editor:
bindings:
BackSpace: back_syllable
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " '"
algebra:
- erase/^xx$/
chord_composer:
# 字母表,包含用於並擊的按鍵
# 擊鍵雖有先後,形成並擊時,一律以字母表順序排列
alphabet: "swxdecfrvgtbjum ki,lo."
# 拼寫運算規則,將一組並擊編碼轉換爲拼音音節
algebra:
# 先將物理按鍵字符對應到宮保拼音鍵位中的拼音字母
- 'xlit|swxdecfrvgtbjum ki,lo.|sczhlfgdbktpiuVaUIYNGM|'
# 以下根據宮保拼音的鍵位分別變換聲母、韻母部分
# 組合聲母
- xform/^zf/gw/
- xform/^cl/kw/
- xform/^fb/m/
- xform/^ld/n/
- xform/^hg/ng/
- xform/^gk/j/
- xform/^sh/w/
- xform/VY$/eoi/
- xform/IG$/K/
- xform/UN$/T/
- xform/YM$/P/
- xform/ua/o/
- xform/ia/e/
- xform/Va/eo/
- xform/^a$/ /
- xform/^Y$/aa/
- xform/^([cldtshgkzfbpjnmw]|gw|kw|ng|)([IUYGNMKPT]?)$/$1aa$2/
- xform/G$/ng/
- xlit/NMIUYKTP/nmiuiktp/
- xform/eo(ng|k)/oe$1/
- xform/V/yu/
- xform/^u/wu/
- xform/^yu/jyu/
- xform/^i/ji/
- xform/^ma$/m/
- xform/^nga$/ng/
# 並擊完成後套用的式樣
output_format:
- erase/^[iu]/
# 追加隔音符
- xform/^([bpmfdtnlghkwjzsc]|gw|kw|ng|)(aa|a|jyu|u|i|o|oe|eo|e)(ng?|m|k|t|p|i|u|)$/$1$2$3'/
# 消除不構成合法音節的並擊組合
- "erase/^([A-Za-z]+)$/"
# 並擊過程中套用的式樣
prompt_format:
# 加方括弧
- "xform/^(.*)$/[$1]/"
translator:
dictionary: jyutping
prism: combo_jyutping
punctuator:
import_preset: default
key_binder:
import_preset: default
recognizer:
import_preset: default