rhubarb-lip-sync/lib/soundchange/english.sc

236 lines
2.7 KiB
Python
Raw Permalink Normal View History

2016-06-03 08:37:47 +00:00
*
* Variables
*
* vowels, long, short
U=aeiou
V=aeiou<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@
L=<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@
S=<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@
A=a<EFBFBD><EFBFBD>
E=e<EFBFBD><EFBFBD>
I=i<EFBFBD><EFBFBD>
O=o<EFBFBD><EFBFBD>
&=eiou
* front
F=ei<EFBFBD><EFBFBD>y
* any letter
X=bcdfghjklmnpqrstvwxyz<EFBFBD>+$<EFBFBD>aeiou<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@
* consonants
C=bcdfghjklmnpqrstvwxyz<EFBFBD>+$<EFBFBD>
* dentals, liquids, nasals
D=td+
R=rl
M=mn<EFBFBD>
T=tdns+
* stops, fricatives (voiced and voiceless)
P=ptk
B=bdg
<EFBFBD>=fs$+
Z=vz#+
*
* Rules
*
* get rid of some digraphs
ch/<EFBFBD>/_
sh/$/_
ph/f/_
th/+/_
qu/kw/_
* and other spelling-level changes
w//_r
w//_ho
h//w_
h//#r_
h//x_
h//V_#
x/gz/#e_V
x/ks/_
'//_
* gh is particularly variable
gh/g/_V
V/L/C_gh
ough/<EFBFBD>/_t
augh/<EFBFBD>/_t
ough/<EFBFBD>/_
gh//_
* unpronounceable combinations
g//#_n
k//#_n
m//#_n
p//#_t
p//#_s
t//#_m
* medial y = i
y/<EFBFBD>/#C_#
y/<EFBFBD>/#CC_#
y/<EFBFBD>/#CCC_#
ey/<EFBFBD>/_
ay/<EFBFBD>/_
oy/<EFBFBD>y/_
y/i/C_C
y/i/C_#
y/i/C_e#
ie/<EFBFBD>/CC_#
ie/<EFBFBD>/#C_#
* sSl can simplify
t//s_lV#
* affrication of t + front vowel
ci/$/X_V
ti/$/X_V
tu/<EFBFBD>u/X_V
tu/<EFBFBD>u/X_RV
si/$/C_o
si/j/V_o
s/$/C_ur
s/j/V_ur
s/$/k_uV
s/$/k_uR
* intervocalic s
s/z/&_V
* al to ol (do this before respelling)
a/<EFBFBD>/_ls
a/<EFBFBD>/_lr
a/<EFBFBD>/_ll#
a/<EFBFBD>/_lm(V)#
a/<EFBFBD>/C_lD
a/<EFBFBD>/#_lD
al/<EFBFBD>/X_k
* soft c and g
c/s/_F
c/k/_
ge/j/X_a
ge/j/X_o
g/j/_F
* init/final guF was there just to harden the g
gu/g/#_F
gu/g/_e#
* untangle reverse-written final liquids
re/@r/C_#
le/@l/C_#
* vowels are long medially
U/L/C_CV
U/L/#_CV
* and short before 2 consonants or a final one
U/S/C_CC
U/S/#_CC
U/S/C_C#
U/S/#_C#
* special but general rules
<EFBFBD>/<EFBFBD>/_nd#
<EFBFBD>/<EFBFBD>/_ss#
<EFBFBD>/<EFBFBD>/_g#
<EFBFBD>/<EFBFBD>/_fC
<EFBFBD>/<EFBFBD>/_lD
<EFBFBD>/<EFBFBD>/w_$
<EFBFBD>/<EFBFBD>/w_(t)<EFBFBD>
<EFBFBD>/<EFBFBD>/w_T
* soft gn
<EFBFBD>g/<EFBFBD>/_M#
<EFBFBD>g/<EFBFBD>/_MC
g//ei_n
* handle ous before removing -e
ou/@/_s#
ou/@/_sC
* remove silent -e
e//VC(C)(C)_#
* common suffixes that hide a silent e
<EFBFBD>//XXX_m<EFBFBD>nt#
<EFBFBD>//XXX_n<EFBFBD>ss#
<EFBFBD>//XXX_li#
<EFBFBD>//XXX_f<EFBFBD>l#
* another common suffix
<EFBFBD>/<EFBFBD>/XXX_n<EFBFBD>ss#
* shorten (1-char) weak penults after a long
* note: this error breaks almost as many words as it fixes...
L/S/LC(C)(C)_CV#
* double vowels
eau/<EFBFBD>/_
ai/<EFBFBD>/_
au/<EFBFBD>/_
<EFBFBD>w/<EFBFBD>/_
ee/<EFBFBD>/_
ea/<EFBFBD>/_
ei/<EFBFBD>/s_
ei/<EFBFBD>/_
eo/<EFBFBD>@/_
<EFBFBD>w/<EFBFBD>/_
eu/<EFBFBD>/_
ie/<EFBFBD>/_
V/@/i_
i/<EFBFBD>/#C(C)_
i/<EFBFBD>/_@
oa/<EFBFBD>/_
oe/<EFBFBD>/_#
oo/<EFBFBD>/_k
oo/u/_
oul/<EFBFBD>/_d#
ou/<EFBFBD>w/_
oi/<EFBFBD>y/_
ua/<EFBFBD>@/_
ue/u/_
ui/u/_
<EFBFBD>w/<EFBFBD>/_#
* those pesky final syllabics
2016-06-03 08:37:47 +00:00
V/@/VC(V)_l#
<EFBFBD>/@/VC(C)_n#
<EFBFBD>/@/VC(C)_n#
<EFBFBD>/@/VC(C)_n#
<EFBFBD>/@/VC(C)_n#
* suffix simplifications
A/@/XXX_b@l#
<EFBFBD>/y/Xl_@n#
<EFBFBD>/y/Xn_@n#
* unpronounceable finals
b//m_#
n//m_#
* color the final vowels
a/@/_#
e/<EFBFBD>/_#
i/<EFBFBD>/_#
o/<EFBFBD>/_#
* vowels before r V=aeiou<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>@
<EFBFBD>w/<EFBFBD>/_rX
<EFBFBD>/<EFBFBD>/_r
<EFBFBD>/<EFBFBD>/_r
<EFBFBD>/<EFBFBD>/w_rC
<EFBFBD>/<EFBFBD>/w_r#
<EFBFBD>/<EFBFBD>/_rr
<EFBFBD>/<EFBFBD>/_rIC
<EFBFBD>/<EFBFBD>/_rr
<EFBFBD>/<EFBFBD>/_rC
<EFBFBD>/<EFBFBD>/_r#
<EFBFBD>/<EFBFBD>/_r
<EFBFBD>/@/_r
<EFBFBD>/@/_r
<EFBFBD>/@/_r
<EFBFBD>/@/_r
* handle ng
ng/<EFBFBD>/_<EFBFBD>
ng/<EFBFBD>/_B
ng/<EFBFBD>/_P
ng/<EFBFBD>/_#
n/<EFBFBD>/_g
n/<EFBFBD>/_k
<EFBFBD>/<EFBFBD>/_<EFBFBD>
<EFBFBD>/<EFBFBD>/_<EFBFBD>
* really a morphophonological rule, but it's cute
s/z/B_#
s/z/_m#
* double consonants
s//_s
s//_$
t//_t
t//_<EFBFBD>
p//_p
k//_k
b//_b
d//_d
d//_j
g//_g
n//_n
m//_m
r//_r
l//_l
f//_f
z//_z