-
Notifications
You must be signed in to change notification settings - Fork 27
/
rulebook.txt
212 lines (212 loc) ยท 9.09 KB
/
rulebook.txt
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
### ----------------------------------------------------------------------------------------
### ํ๊ตญ์ด ๋ฐ์๊ท์น (Korean G2P Rulebook)
### Last updated: 2019-01-31
### Yejin Cho (ycho@utexas.edu)
### ์ฒ๋ฆฌ์์:
### ์์ธ์ฒ๋ฆฌ - ์ ๊ธฐ์ํ(๊ฒน๋ฐ์นจ) - ๊ฒน๋ฐ์นจ๊ด๋ จ๊ท์น - ๊ฒฝ์ํ - ๊ฒน๋ฐ์นจ๋จ์ํ - ๋น์ํ - ๋ฆฌ์ ์ฌ์์ ํ
### - ์ ์ํ - ๊ตฌ๊ฐ์ํ - ์ ๊ธฐ์ํ(ํ๋ฐ์นจ) - ์ฐ์ - ์ข
์ฑ์คํ - ๋ฆฌ์ ์ฌ์์ ํ [์ข
๋ฃ]
### ----------------------------------------------------------------------------------------
### ์์ธ์ฒ๋ฆฌ
ii,ll,[#-]y([aeoquv]), ii,ll,rr,y\1, # ์ผ ์ฐ๋, ์ผ์ญ์ผ์ฌ๊ฐ
(h0,aa|t0,xx),ll,-ii,ll, \1,ll,rr,ii,ll, # ๋ค์ผ, ๋ณผ์ผ, ํ ์ผ
s0,vv,ll,-ii,kf, s0,vv,ll,rr,ii,kf, # ์ค์ต(๋ค)
mm,uu,ll,-k0,oo,-k0,ii, mm,uu,ll,kk,oo,k0,ii, # ๋ฌผ๊ณ ๊ธฐ
s0,ii,ll,-s0,ii,ll s0,ii,ll,s0,ii,ll # ์ค์ค
k0,ii,-s0,xx,lk, k0,ii,s0,xx,kf, # ๊ธฐ์ญ
c0,vv,ll,-ya,kf, c0,vv,rr,ya,kf, # ์ ์ฝ
k0,xx,mf,-yo,-ii,ll, k0,xx,-mm,yo,-ii,ll, # ๊ธ์์ผ
lt,-ii, ll,-ch,ii, # ํ์ด
(?<=nn,vv,)lb,(?=-(c0,(uu|vv),kf|t0,(uu|vv),ng)) pf, # ๋์ฃฝ/๋๋ฅ๊ธ๋ค
(?<=s0,ii,)lh,-c0,(?=xx,ng) ll,cc, # ์ซ์ฆ
t0,aa,lk, t0,aa,kf, # ๋ญ
(wq|we|oo),nf,-k0,aa,c0, \1,nf,k0,aa,tf, # ์จ๊ฐ
mm,aa,tf,-h0,yv,ng, mm,aa,th,yv,ng, # ๋งํ
k0,vv,th,-oo,s0, k0,vv,t0,oo,tf, # ๊ฒ์ท
c0,uu,ll,-nn,vv,mf,-k0,ii, c0,uu,ll,rr,vv,mf,-kk,ii, # ์ค๋๊ธฐ
h0,oo,th,-ii,-p0,uu,ll, h0,oo,nf,nn,ii,p0,uu,ll, # ํ์ด๋ถ
s0,aa,ks,-ii,ll, s0,aa,ng,nn,ii,ll, # ์ฏ์ผ
mm,qq,nf,-ii,pf, mm,qq,nf,nn,ii,pf, # ๋งจ์
kk,oo,ch,-ii,ph, kk,oo,nf,nn,ii,pf, # ๊ฝ์
nn,qq,-p0,oo,kf,-ya,kf, nn,qq,p0,oo,ng,nn,ya,kf, # ๋ด๋ณต์ฝ
h0,aa,nf,-yv,-rr,xx,mf, h0,aa,nf,nn,yv,rr,xx,mf, # ํ์ฌ๋ฆ
nn,aa,mf,-c0,oo,nf,-yv,-p0,ii, nn,aa,mf,c0,oo,nf,nn,yv,p0,ii, # ๋จ์กด์ฌ๋น
s0,ii,nf,-yv,-s0,vv,ng, s0,ii,nf,nn,yv,s0,vv,ng, # ์ ์ฌ์ฑ
s0,qq,kf,-yv,nf,-ph,ii,ll, s0,qq,ng,nn,yv,nf,ph,ii,ll, # ์์ฐํ
t0,aa,mf,-yo, t0,aa,mf,nn,yo, # ๋ด์
nn,uu,nf,-yo,-k0,ii, nn,uu,nf,nn,yo,k0,ii, # ๋์๊ธฐ
vv,pf,-yo,ng, vv,mf,nn,yo,ng, # (์)์
์ฉ
s0,ii,kf,-yo,ng,-yu, s0,ii,k0,yo,ng,nn,yu, # ์์ฉ์
nf,-yu,nf,-rr,ii, nf,nn,yu,ll,rr,ii, # (๊ตญ๋ฏผ)์ค๋ฆฌ
(c0|s0),(aa|oo|uu),ll,-ii,(ph|p0|pf), \1,\2,ll,rr,ii,pf, # ์์
๋ค, ์์, ์ ์
(?=(^|#))h0,aa,nf,-ii,ll, h0,aa,nf,nn,ii,ll, # ํ์ผ
(?=(^|#))mm,aa,kf,-ii,ll, mm,aa,ng,nn,ii,ll, # ๋ง์ผ
mm,oo,ll,-s0,aa,ng,-s0,ii,kf, mm,oo,ll,ss,aa,ng,s0,ii,kf, # ๋ชฐ์์
oo,s0,#ii,pf, oo,nf,nn,ii,pf, # ์ท์
(๋ค)
(nf|ll),-yv,-s0,vv,-s0, \1,nn,yv,s0,vv,tf, # (์ค๋ฌผ/์๋ฅธ)์ฌ์ฏ
(ng|mf|nf),-y([aeoquv]), \1,nn,y\2, # ๋ฐค์ท, ์งํ์ด์ฐจ, ์ฝฉ์ฟ, ๋ณถ์์ฟ
(wv|ii),ll,-y([aeoquv]), \1,rr,y\2, # ์ผ/์์์ผ
ll,-y([aeoquv]), ll,rr,y\1, # ๋ถ์ฌ์ฐ, ๋ฌผ์ฝ, ์์ธ์ญ, ๋ฌผ์ฟ, ๋ฌผ์, ๊ตด์, ํ๋ฐ์ , ์ ๋ค์ ๋ค
ii,ll,-c0,vv,ll, ii,ll,cc,vv,ll, # ์ผ์
(th|tf|s0),-y([aeoquv]), nf,-nn,y\2, # ์ฅ๊ฐ์
(<=^|#)mm,aa,kf,-ii,ll mm,aa,ng,nn,ii,ll # ๋ง์ผ
k0,uu,-k0,xx,nf,-rr,yu, k0,uu,k0,xx,nf,nn,yu, # ๊ตฌ๊ทผ๋ฅ
k0,aa,ll,-([ct])0,xx,ng, k0,aa,ll,\1\1,xx,ng, # ๊ฐ๋ฑ/๊ฐ์ฆ
p0,aa,ll,-t0,oo,ng, p0,aa,ll,tt,oo,ng, # ๋ฐ๋
c0,vv,ll,-t0,oo, c0,vv,ll,tt,oo, # ์ ๋
mm,aa,ll,-s0,aa,ll, mm,aa,ll,ss,aa,ll, # ๋ง์ด
p0,uu,ll,-s0, p0,uu,ll,ss, # ๋ถ์/๋ถ์ธ์ถ
ii,ll,-s0,ii, ii,ll,ss,ii, # ์ผ์
p0,aa,ll,-c0,vv,nf, p0,aa,ll,cc,vv,nf, # ๋ฐ์
(?<=(s0,ii,nf,|s0,aa,mf,)-)(c|k|t)0, \2\2, # ์ ๊ณ , ์ ๋ค, ์ ์, ์ผ๊ณ , ์ผ๋ค, ์ผ์
(?<=k0,ii,mf,-)p0, pp, # ๊น๋ฐฅ
(?<=t0,vv,-t0,xx,mf,-)c0, cc, # ๋๋ฌ์ง
c0,aa,mf,-c0,aa,-rr,ii, c0,aa,mf,cc,aa,rr,ii, # ์ ์๋ฆฌ
(?<=(ng|ll),-)c0,(?=uu,ll,-k0,ii) cc, # ๋ฌผ์ค๊ธฐ, ๊ฐ์ค๊ธฐ
(?<=(nf|ll),-)p0,vv,pf, pp,vv,pf, # ๋ฌธ๋ฒ, ๋ถ๋ฒ
(?<=(nf|tf),-)p0,(?=aa,-rr,aa,mf) pp, # ์ ๋ฐ๋, ๋ฆ๋ฐ๋
p0,aa,-rr,aa,mf,-k0,yv,ll, p0,aa,rr,aa,mf,kk,yv,ll, # ๋ฐ๋๊ฒฐ
(?<=(mf|kf),-)p0,(?=aa,pf,) pp, # ์์นจ๋ฐฅ, ์ ์ฌ๋ฐฅ, ์ ๋
๋ฐฅ
(?<=nn,uu,nf,-)t0, tt, # ๋๋์, ๋๋์ค
mm,aa,kf,-yv,mf, mm,aa,ng,nn,yv,mf, # ๋๋ง์ผ, ๊ฒฐ๋ง์ผ
p0,aa,lb,-(t|k)0, p0,aa,pf,\1\1, # ๋ฐ๋ค, ๋ฐ๊ณ
p0,aa,lb,-nn, p0,aa,mf,nn, # ๋ฐ๋
nn,vv,lb,-(t|k)0, nn,vv,ll,\1\1, # ๋๋ค, ๋๊ณ
mm,(aa|vv),s0,-ii,ss,-t0,aa, mm,\1,t0,ii,tf,tt,aa, # ๋ง์๋ค
mm,(aa|vv),s0,-vv,ps,-t0,aa, mm,\1,t0,vv,pf,tt,aa, # ๋ง์๋ค
c0,vv,c0,-vv,-mm,ii, c0,vv,t0,vv,mm,ii, # ์ ์ด๋ฏธ
h0,vv,s0,-uu,s0,-xx,mf, h0,vv,t0,uu,s0,xx,mf, # ํ์์
k0,aa,ps,-vv,-ch,ii, k0,aa,p0,vv,ch,ii, # ๊ฐ์ด์น
k0,aa,ps,-ii,ss,-nn,xx,nf, k0,aa,p0,ii,nf,nn,xx,nf, # ๊ฐ์๋
c0,vv,lm,-c0,ii, c0,vv,mf,cc,ii, # ์ ์ง
oo,lm,-k0,(?=[iy]) oo,mf,k0, # ์ฎ๊ธฐ(๋ค)
k0,uu,lm,-k0,ii,-t0,aa, k0,uu,mf,k0,ii,t0,aa, # ๊ตถ๊ธฐ๋ค
(nn|k0|h0),aa,ll,-(p|s|c|k|t)0, \1,aa,ll,\2\2, # ๊ฐ๋ฐ, ํ ๋ฐ, ๋ง๋ ๊ฒ
ch,vv,s0,-ii,nf, ch,vv,t0,ii,nf, # ์ฒซ์ธ(์)
(?<=(mf|nf),-)ii,-p0,uu,ll, nn,ii,p0,uu,ll, # ์์ด๋ถ
(?<=(nf|ll),-)k0,oo,-rr,ii, kk,oo,rr,ii, # ๋ฌธ๊ณ ๋ฆฌ
(?<=(nf|ll),-)s0,qq, ss,qq, # ์ฐ์, ๋ค์
(?<=(nf|ll),-)c0,qq,-c0,uu, cc,qq,c0,uu, # ์์ฌ์ฃผ, ๊ธ์ฌ์ฃผ
k0,ii,ll,-k0,aa, k0,ii,ll,kk,aa, # ๊ธธ๊ฐ
mm,uu,ll,-t0,oo,ng,-ii, mm,uu,ll,tt,oo,ng,ii, # ๋ฌผ๋์ด
mm,uu,ll,-c0, mm,uu,ll,-cc, # ๋ฌผ์ฆ
(?<=(nf|ll),-)p0,aa,-t0,aa,kf, pp,aa,t0,aa,kf, # ๋ฐ๋ฐ๋ฅ, ์๋ฐ๋ฅ
(?<=(nf|ll),-)s0,oo,kf, ss,oo,kf, # ๊ตด์, ๋ฌผ์
(?<=s0,uu,ll,-)(c|p|t)0, \1\1, # ์ ์, ์ ๋
, ์ ๋ณ, ์ ์๋ฆฌ
k0,aa,ng,-k0,aa, k0,aa,ng,kk,aa, # ๊ฐ๊ฐ
(?<=(ng|mf),-)t0,aa,ll, tt,aa,ll, # ์ด์น๋ฌ
t0,xx,ng,-p0,uu,ll, t0,xx,ng,pp,uu,ll, # ๋ฑ๋ถ
ch,aa,ng,-s0,aa,ll, ch,aa,ng,ss,aa,ll, # ์ฐฝ์ด
(?<=(ll|ng),-)c0,uu,ll,-k0,ii, k0,aa,ng,cc,uu,ll,k0,ii, # ๊ฐ์ค๊ธฐ, ๋ฌผ์ค๊ธฐ
aa,nf,-k0,oo, aa,nf,kk,oo, # ์๊ณ
(?<=kk,yv,-aa,nf,-)(t|c)0, \1\1, # ๊ปด์์ง, ๊ปด์๋ค
ii,-c0,uu,kf,-ii,-c0,uu,kf, ii,c0,uu,ng,nn,ii,c0,uu,kf, # ์ด์ฃฝ์ด์ฃฝ
ya,-k0,xx,mf,-ya,-k0,xx,mf, ya,k0,xx,mf,nn,ya,k0,xx,mf, # ์ผ๊ธ์ผ๊ธ
p0,ee,-k0,qq,s0,-ii,s0, p0,ee,k0,qq,nf,nn,ii,tf, # ๋ฒ ๊ฐฏ์
kk,qq,s0,-ii,ph, kk,qq,nf,nn,ii,pf, # ๊นป์
nn,aa,-mm,uu,s0,-ii,ph, nn,aa,mm,uu,nf,nn,ii,pf, # ๋๋ญ์
qq,s0,-yv,ll, qq,nf,nn,yv,ll, # ๋๋ฆฌ๊นป์ด
t0,wi,s0,-(?=[aeqiouyvwx]) t0,wi,nf,-nn, # ๋ท์ท, ๋ท์๊ธฐ
nn,xx,c0,-yv,-rr,xx,mf, nn,xx,tf,nn,yv,rr,xx,mf, # ๋ฆ์ฌ๋ฆ
t0,ii,-k0,xx,tf,-(ii|xx|ee), t0,ii,k0,xx,s0,\1, # ๋๊ทฟ์, ๋๊ทฟ์ด
(c0|ch|th|h0),ii,-xx,(c0|ch|th|h0),-(ii|xx|ee), \1,ii,xx,s0,\3, # ์น์์ด, ์ง์์
ph,ii,-xx,ph,-(ii|xx|ee), ph,ii,xx,p0,\1, # ํผ์์
kh,ii,-xx,kh,-(ii|xx|ee), kh,ii,xx,k0,\1, # ํค์์ด
### ์ ๊ธฐ์ํ (๊ฒน๋ฐ์นจ)
l(b|p),-h0, ll,-ph,
nh,-(c|k|t)0, nf,-\1h,
lh,-(c|k|t)0, ll,-\1h,
lk,-h0, ll,-kh,
nc,-h0, nf,-ch,
### ๊ฒน๋ฐ์นจ ๊ท์น (ในใ
)
(k0,aa,|k0,uu,|k0,vv,|oo,|p0,aa,|nn,aa,|nn,xx,|p0,uu,|^ii,|-,ii,mm,aa,|mm,uu,|(^|-,)vv,)lk,-(t0|c0|s0), \1kf,-\3,
(k0,aa,|k0,uu,|k0,vv,|vv,|oo,|mm,aa,|p0,aa,|nn,aa,|nn,xx,|mm,uu,|p0,uu,|^ii,|-,ii,)lk,-k0, \1ll,-kk,
### ๊ฒน๋ฐ์นจ ๊ท์น (ใดใ
)
nh,-(k|t|c)0, nf,-\1h,
nh,-s0, nf,-ss,
nh,-nn, nf,-nn,
nh,-(?=[aeqiouyvwx]) -nn,
### ๊ฒน๋ฐ์นจ ๊ท์น (ในใ
)
lh,-nn, ll,-rr,
lh,-(k|t|c)0, ll,-\1h,
lh,-s0, ll,-ss,
lh,-(?=[aeqiouyvwx]) -rr,
### ๊ฒน๋ฐ์นจ ๊ท์น (ใดใ
)
nc,-([ktsc])0, nf,-\1\1,
### ๊ฒน๋ฐ์นจ ๊ท์น (ในใ
)
(c0,vv,|c0,ii,|k0,uu,|t0,aa,|(^|-,)oo,|k0,oo,)lm,-([ktsc])0, \1mf,-\3\3,
### ๊ฒน๋ฐ์นจ ๊ท์น (ในใ
)
(p0,aa,|tt,vv,|(^|-,)yv,|nn,vv,|(^|-,)ya,|cc,aa,)lb,-([ktsc])0, \1ll,-\4\4,
### ๊ฒน๋ฐ์นจ ๊ท์น (ในใ
)
h0,(aa|uu),lt,-nn, h0,\1,ll,-ll,
h0,(aa|uu),lt,-([ktsc])0, h0,\1,ll,-\2\2,
### ๊ฒฝ์ํ
lk,-(c|k|p|s|t)0, kf,-\1\1,
l(b|p),-p0, pf,-pp,
s0,-p0, tf,-pp,
l(b|t),-(c|k|s|t|p)0, ll,-\2\2,
lp,-(c|k|s|t)0, pf,-\1\1,
(c[h0]|s[s0]|t[fh]),-(c|k|s|t)0, tf,-\2\2,
k[fhks],-(c|k|p|s|t)0, kf,-\1\1,
p[sfh],-(c|k|p|s|t)0, pf,-\1\1,
(?<=(kf|kh|ks|ss|c0|ch|tf|th),-)p0, pp,
h0,-s0, -ss,
nh,-s0, nf,-ss,
lh,-s0, ll,-ss,
### ๊ฒน๋ฐ์นจ ๋จ์ํ: ์ด๋ง ๋๋ ์์ ์
(ks|lk),(?=(#|$|-[ptkshcmnr])) kf,
n[ch],(?=(#|$|-[ptkshcmnr])) nf,
l[bsth],(?=(#|$|-[ptkshcmnr])) ll,
lm,(?=(#|$|-[ptkshcmnr])) mf,
(ps|lp),(?=(#|$|-[ptkshcmnr])) pf,
### ๊ฒน๋ฐ์นจ ๋จ์ํ: ๋ชจ์ ์
([kp])s,-(?=[aeqiouyvwx]) \1f,-ss,
ls,-(?=[aeqiouyvwx]) ll,-ss,
nc,-(?=[aeqiouyvwx]) nf,-c0,
lk,-(?=[aeqiouyvwx]) ll,-k0,
lm,-(?=[aeqiouyvwx]) ll,-mm,
lb,-(?=[aeqiouyvwx]) ll,-p0,
l([tp]),-(?=[aeqiouyvwx]) ll,-\1h,
### ๋น์ํ
(?<=[pk])0,-rr, f,-nn,
(c0|ch|s0|ss|tf|nh|h0),-nn, nf,-nn,
nc,-(p|t|k)0, nf,-\1\1,
nc,(?=-[ptkshcmnr]) nf,
lm,-k0, mf,-kk,
lm,(?=-[ptkshcmnr]) mf,
k[fhks],(?=-(nn|mm),) ng,
lk,(?=-(nn|mm),) ng,
p[sfh],(?=-(nn|mm),) mf,
l[bp],(?=-(nn|mm),) mf,
(?<=(mf|ng|pf|kf),-)rr, nn,
(c0|ch|s0|ss|tf|nh|h0),(?=-mm,) nf,
### ๋ฆฌ์ ์ฌ์์ ํ
ll,-(?=y) -rr,
### ์ ์ํ
(nf|ll),-rr, ll,-rr,
l[lht],-nn, ll,-rr,
### ๊ตฌ๊ฐ์ํ
tf,-(?=[iy]) -c0,
th,-(?=[iy]) -ch,
tf,-h0,(?=[iy]) -ch,
### ์ ๊ธฐ์ํ (ํ๋ฐ์นจ)
(p|k)f,-h0, -\1h,
h0,-(c|k|t)0, -\1h,
(tf|th|s0),(-|#)h0, -th,
### ์ฐ์๊ท์น
(s0|ss|kk|p0|ph|pp|t0|th|tt|c0|ch|kh|kk|k0|mm|nn),-(?=[aeqiouyvwx]) -\1,
nh,-(?=[aeqiouyvwx]) -nn,
(s0|ss|c0|ch|th),(?=-[ptkshcmnr]) tf,
h0,-(?=[aeqiouyvwx]) -
lh,-?(?=[aeqiouyvwx]) -rr,
(p|t|k)f,-?(?=[aeqiouyvwx]) -\g<1>0,
(m|n)f,-?(?=[aeqiouyvwx]) -\1\1,
### ์ข
์ฑ๊ท์น
(s0|ss|c0|ch|th),(?=-|#|$) tf,
(kh|kk|ks|lk),(?=-|#|$|[ptkshcmnr]) kf, # (ks|lk),(?=-[ptkshcmnr]) kf,
(ph|lp|ps),(?=-|#|$|[ptkshcmnr]) pf,
(?<=[ptkshcmnr].),-(?=[aeqiouyvwx]) ,
l[bhstp],(?=-|#|$|[ptkshcmnr]) ll, # l[bt],(?=-[ptkshcmnr]) ll,
nh,(?=-|#|$|[ptkshcmnr]) nf,-
### ๋ฆฌ์ ์ฌ์์ ํ
(?<=[aeqiouyvwx].,)ll,-(?=[aeqiouyvwx]) -rr,
ll,-ll, ll,-rr,