/
jyutgaan.schema.yaml
109 lines (100 loc) · 2.53 KB
/
jyutgaan.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
# Rime schema
# encoding: utf-8
schema:
schema_id: jyutgaan
name: 粵語簡拼
version: "2020.08.11"
author:
- Jack Chen <redchenjs@live.com>
description: |
採用香港語言學會粵語拼音方案
https://www.jyutping.org/jyutping/
----------簡拼規則----------
聲母 ng gw kw
按鍵 r y x
韻腹 aa oe eo yu
按鍵 q v v y
韻尾 ng
按鍵 b
dependencies:
- luna_pinyin
- jyut6ping3
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: simplification
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
- reverse_lookup_translator
- script_translator
filters:
- simplifier
- uniquifier
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " '"
algebra:
- xform/([a-z])[0-9]$/$1/ # 忽略聲調
- xform/^ng([a-z])/r$1/ # ^ng => r
- xform/^gw([a-z])/y$1/ # ^gw => y
- xform/^kw([a-z])/x$1/ # ^kw => x
- xform/([a-z])aa/$1q/ # *aa => q
- xform/([a-z])oe/$1v/ # *oe => v
- xform/aa([a-z])/q$1/ # aa* => q
- xform/oe([a-z])/v$1/ # oe* => v
- xform/eo([int])/v$1/ # eo+ => v
- xform/([a-z])yu/$1y/ # *yu => y
- xform/([a-z])ng$/$1b/ # *ng => b
- abbrev/^([a-z]).+$/$1/ # 首字母簡拼
translator:
dictionary: jyut6ping3
prism: jyutgaan
spelling_hints: 8
preedit_format:
- xform/(^|[ '])r([a-z])/$1ng$2/ # ^r => ng
- xform/(^|[ '])y([a-z])/$1gw$2/ # ^y => gw
- xform/(^|[ '])x([a-z])/$1kw$2/ # ^x => kw
- xform/([a-z])q/$1aa/ # *q => aa
- xform/([a-z])v/$1oe/ # *v => oe
- xform/q([a-z])/aa$1/ # q* => aa
- xform/v([a-z])/oe$1/ # v* => oe
- xform/oe([int])/eo$1/ # oe => eo
- xform/([a-z])y/$1yu/ # *y => yu
- xform/([a-z])b/$1ng/ # *b => ng
reverse_lookup:
dictionary: luna_pinyin
prefix: "`"
suffix: "'"
tips: 〔拼音〕
preedit_format:
- xform/([nljqxy])v/$1ü/
punctuator:
import_preset: default
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
reverse_lookup: "`[a-z]*'?$"