forked from rime/rime-jyutping
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yale.schema.yaml
106 lines (97 loc) · 2.38 KB
/
yale.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
# Rime schema
# encoding: utf-8
schema:
schema_id: yale
name: 耶魯粵語拼音
version: "0.1"
author:
- 幸延 <[email protected]>
description: |
耶魯粵語拼音方案
https://zh-yue.wikipedia.org/wiki/%E9%A6%99%E6%B8%AF%E8%AA%9E%E8%A8%80%E5%AD%B8%E5%AD%B8%E6%9C%83%E7%B2%B5%E8%AA%9E%E6%8B%BC%E9%9F%B3%E6%96%B9%E6%A1%88
dependencies:
- luna_pinyin
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
- script_translator
- reverse_lookup_translator
filters:
- simplifier
- uniquifier
speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " '"
algebra:
- xform/^jy/y/ # 粵 jyut -> yut
- xform/^j/y/ # 用 jung -> yung
- xform/^z/j/ # 抓 zaa -> ja
- xform/^c/ch/ # 叉 caa -> cha
- xform/aa$/a/ # 煆 haa -> ha
- xform/eu/iu/ # 掉 deu -> diu
- xform/eo/eu/ # 蹲 deon -> deun
- xform/oe/eu/ # 剁 doek -> deuk
- xform/em/im/ # 舐 lem -> lim
- xform/ep/ip/ # 夾 gep -> gip
- abbrev/^([a-z]).+$/$1/ # 首字母簡拼
- abbrev/^(ng).+$/$1/ # 聲母簡拼
- abbrev/^(ch).+$/$1/ # 聲母簡拼
- abbrev/^([gk]w).+$/$1/ # 聲母簡拼
translator:
dictionary: jyutping
prism: yale
spelling_hints: 5
comment_format: &comment_rules
- xform/jy/y/
- xform/j/y/
- xform/z/j/
- xform/c/ch/
- xform/aa(\>|$)/a/
- xform/eu/iu/
- xform/eo/eu/
- xform/oe/eu/
- xform/em/im/
- xform/ep/ip/
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: *comment_rules
punctuator:
import_preset: default
key_binder:
import_preset: default
recognizer:
import_preset: default
patterns:
reverse_lookup: "`[a-z]*'?$"