-
Notifications
You must be signed in to change notification settings - Fork 2
/
jyut6ping3_bc.schema.yaml
120 lines (93 loc) · 2.92 KB
/
jyut6ping3_bc.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
# Rime schema
# encoding: utf-8
__include: jyut6ping3.schema:/
schema:
schema_id: jyut6ping3_bc
name: 粵語拼音(趙氏粵語羅馬字版)
version: "2020.08.03"
description: |-
採用香港語言學學會粵語拼音方案
https://www.lshk.org/jyutping
支援趙氏粵語羅馬字顯示
(必須輸入聲調,否則不能正確轉換)
來源:https://w.wiki/YUh
Telegram 用户交流組 https://t.me/rime_cantonese
translator:
prism: jyut6ping3_bc
preedit_format:
############## 正則化:轉換為正確粵拼 ##############
- xform/([^ 'a])a(?=$|[ '])|aa?(?=[vxq])/$1aa/
- xform/(^|[ '])[jy]u(?!ng|k)/$1jyu/
- xform/(^|[ '])y(?=$|[ '])/$1j/
- xform/(^|[ '])yu?(n|t)?(?=$|[vxq '])/$1jyu$2/
- xform/(^|[ '])y/$1j/
- xform/(oe|eo)y(?=$|[vxq '])/eoi/
- xform/yu?/yu/
- xform/oe([int])(?=$|[vxq '])/eo$1/
- xform/eo(ng|k)?(?=$|[vxq '])/oe$1/
- xform/q(?=[aeiou])//
- xform/(g|k)wu/$1u/
###################################################
# 分辨陰陽聲
- xform/(^|[ '])([^vxq]+?)(vv|xx|qq)/$1\U$2$3\E/ # 陽聲嘅話,變晒大寫
# /m/ /ng/ 獨立音節
- xform/(^|[ 'h])m($|[vxq '])/$1MU$2/
- xform/(^|[ 'h])ng($|[vxq '])/$1NGU$2/
# 聲母轉換
# 陰聲
- xform/(^|[ '])p/$1ph/
- xform/(^|[ '])b/$1p/
- xform/(^|[ '])m/$1mh/
- xform/(^|[ '])t/$1th/
- xform/(^|[ '])d/$1t/
- xform/(^|[ '])n([^g])/$1nh$2/
- xform/(^|[ '])l/$1lh/
- xform/(^|[ '])k/$1kh/
- xform/(^|[ '])g/$1k/
- xform/(^|[ '])ng([^vxq '])/$1ngh$2/
- xform/(^|[ '])h/$1x/
- xform/(^|[ '])z/$1tz/
- xform/(^|[ '])c/$1ts/
- xform/(^|[ '])j/$1i/
- xform/(^|[ '])w/$1u/
# 陽聲
- xform/(^|[ '])P/$1BH/
- xform/(^|[ '])F/$1V/
- xform/(^|[ '])T/$1DH/
- xform/(^|[ '])K/$1GH/
- xform/(^|[ '])Z/$1DZ/
- xform/(^|[ '])C/$1DS/
- xform/(^|[ '])S/$1Z/
- xform/(^|[ '])KW/$1GHW/
- xform/(^|[ '])J/$1Y/
- xform/[A-Z]/\L$&\E/ # 變晒小寫
# 韻母轉換
- xform/aa($|[vxq '])/A$1/
- xform/oe/EU/
- xform/eng($|[vxq '])/EANG$1/
- xform/ek($|[vxq '])/EAK$1/
- xform/ing($|[vxq '])/ENG$1/
- xform/ik($|[vxq '])/EK$1/
- xform/eo([int])($|[vxq '])/O\U$1\E$2/
- xform/o([intk]|ng)($|[vxq '])/OA\U$1\E$2/
- xform/yu/u/
- xform/u(ng|k)($|[vxq '])/O\U$1\E$2/
- xform/[A-Z]/\L$&\E/ # 變晒小寫
# 聲調顯示
# 入聲唔標調
- xform/([ptk])(v|q|qq)($|[ '])/$1$3/
# 平聲唔標調
- xform/vv?($|[ '])/$1/
# 上聲
- xform/([aeou])ixx?($|[ '])/$1E$2/
- xform/([aeio])uxx?($|[ '])/$1O$2/
- xform/ngxx?($|[ '])/G$1/
- xform/xx?($|[ '])/X$1/
# 去聲
- xform/([aeou])iqq?($|[ '])/$1Y$2/
- xform/([aeio])uqq?($|[ '])/$1W$2/
- xform/mqq?($|[ '])/MM$1/
- xform/nqq?($|[ '])/NN$1/
- xform/ngqq?($|[ '])/Q$1/
- xform/qq?($|[ '])/H$1/
- xform/[A-Z]/\L$&\E/ # 變晒小寫