-
Notifications
You must be signed in to change notification settings - Fork 0
/
pinyin_to_yale.schema.yaml
104 lines (91 loc) · 2.43 KB
/
pinyin_to_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
# Rime schema
# encoding: utf-8
__include: pinyin_to_mps.schema:/
schema:
schema_id: pinyin_to_yale
name: 拼音-耶魯
version: "0.2"
author:
- Baopaau <baopaau@gmail.com>
description: |
漢語拼音轉譯漢語耶魯拼音
dependencies:
- terra_pinyin
- cangjie5
translator:
dictionary: terra_pinyin
prism: pinyin_to_mps
strict_spelling: true
spelling_hints: 7
comment_format: &format
- 'xlit -/<\;,> 1234134'
- xform/([iuvaoe](|ng?))vvvvv\>/${1}5/
- xform/([iuvaoe](|ng?))vvvv\>/${1}4/
- xform/([iuvaoe](|ng?))vvv\>/${1}3/
- xform/([iuvaoe](|ng?))vv\>/${1}2/
- xform/([iuvaoe](|ng?))v\>/${1}1/
- xform/([iuvaoe](|ng?))\>/${1}5/ # 補全聲調
# 開始轉譯
- xform/\<r5\>/er5/ # 〜兒
- xform/\<wong4\>/weng4/ # 𥥈/𥦷
- xform/\<([jqx])u/$1v/
- xform/\<([bpmf])o/$1uo/
- xform/\<([zcs])hi([1-5])\>/$1hr$2/
- xform/\<ri([1-5])\>/r$1/
- xform/\<zh/j/
- xform/\<q/ch/
- xform/\<x/sy/
- xform/\<([zcs])i([1-5])\>/$1z$2/
- xform/\<([zcs])ii([1-5])\>/$1i$2/ # 尖音字碼表用
- xform/\<z([aeiouvz])/dz$1/
- xform/\<c([aeiouvz])/ts$1/
- xform/\<dzz([1-5])\>/dz$1/
- xform/iu([1-5])\>/iou$1/
- xform/v/iu/
- xform/ui([1-5])\>/uei$1/
- xform/ao([1-5])\>/au$1/
- xform/([^yi])un([1-5])\>/$1uen$2/
- xform/ong([1-5])\>/ung$1/
- xform/iu([aeiou])/yw$1/
- xform/i([aeiou])/y$1/
- xform/u([aeiou])/w$1/
- xform/\<syy/sy/
# 正詞法(按需啓用)
- xform/^(\w*[aeiourzng][1-5]) ([aeiourng]\w*?[1-5])$/$1-$2/
- xform/([aeiou])-g/$1g/
- xform/g-g/gg/
- xform/^(\S+?) (\S+?)$/$1$2/
# 轉換特殊字母
- xform ([aeiou])(ng?|r)([1234]) $1$3$2
- xform ([aeo])([iuo])([1234]) $1$3$2
- xform a1 ā
- xform a2 á
- xform a3 ǎ
- xform a4 à
- xform e1 ē
- xform e2 é
- xform e3 ě
- xform e4 è
- xform o1 ō
- xform o2 ó
- xform o3 ǒ
- xform o4 ò
- xform i1 ī
- xform i2 í
- xform i3 ǐ
- xform i4 ì
- xform u1 ū
- xform u2 ú
- xform u3 ǔ
- xform u4 ù
- xform r1 r̄
- xform r2 ŕ
- xform r3 ř
- xform r4 r̀
- xform z1 z̄
- xform z2 ź
- xform z3 ž
- xform z4 z̀
- xform/eh[0-5]?/ê/
- xform/([a-z]+)[0-5]/$1/
preedit_format: *format