-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjyutping_compact.schema.yaml
123 lines (114 loc) · 2.66 KB
/
jyutping_compact.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
# Rime schema
# encoding: utf-8
schema:
schema_id: jyutping_compact
name: 袖珍粵拼
version: "0.9.5"
author:
- 雪齋 <[email protected]>
description: |
採用「香港語言學會粵語拼音方案」
簡拼不帶聲調三碼以內,帶聲調四碼以內
僅使用個字母輸入
dependencies:
- luna_pinyin
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
reset: 0
states: [ 半角, 全角 ]
- name: simplification
states: [ 漢字, 汉字 ]
- name: extended_charset
states: [ 通用, 增廣 ]
- name: ascii_punct
states: [ ,。, ,. ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- script_translator
- reverse_lookup_translator
filters:
- simplifier
- uniquifier
- cjk_minifier
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
initials: zwutsponmlkjihgfdcba
delimiter: " '"
algebra:
- derive/om/am/
- xform/gw/u/
- xform/kw/i/
- xform/(^|[^a])a([^a])/$1b$2/
- xform/aa/a/
- xform/(eo|oe)/f/
- xform/yu/j/
- xlit|eo|Gh|
- xform/ng/o/
- xlit|123456G|qxrevyg|
- derive/^([a-z]+)[qxrevy]$/$1/
- abbrev/^([a-z]).*[qxrevy]$/$1/
translator:
dictionary: jyutping_compact
spelling_hints: 6
preedit_format:
- xform/ / /
- xlit|qxrevy|123456|
- xform/a/aa/
- xform/([wtuiopsdfghjklzcbnm])b($|[mnoptk])/$1a$2/
- xform/(^|[123456 ])b([mnoptk])/$1a$2/
- xform/b([iu])($|[123456 ])/a$1$2/
- xform/g($|[mopk123456 ]|i($|[123456 ]))/e$1/
- xform/dgu/deu/
- xform/o/Ng/
- xform/h($|Ng|[mnptk123456 ])/o$1/
- xform/h([iu])($|[123456 ])/o$1$2/
- xform/([^123456 ])hNg/$1oNg/
- xform/([tsdghjklzcn])j($|Ng|[nt123456 ])/$1yu$2/
- xform/(^|[123456 ])u($|[aiou ])/$1gw$2/
- xform/(^|[123456 ])i($|[aiou ])/$1kw$2/
- xform/([tsdghjklzcn])f([nti])/$1eo$2/
- xform/(^|[tsdghjklzcn])f($|Ng|[k123456 ])/$1oe$2/
- xlit|N|n|
- xform/ +/ /
comment_format:
- xform/^/・/
reverse_lookup:
dictionary: luna_pinyin
prefix: "`"
suffix: "'"
tips: 〔拼音〕
preedit_format:
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
comment_format:
- xform/^/〔/
- xform/$/〕/
punctuator:
import_preset: symbols
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
reverse_lookup: "`[a-z]*'?$"
punct: '^/[a-z]*$'