-
Notifications
You must be signed in to change notification settings - Fork 3
/
orthography.foma
executable file
·144 lines (119 loc) · 8.42 KB
/
orthography.foma
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
define Vowels [a|e|i|o|u|á|é|í|ó|ú];
define Cons [b|c|d|f|g|h|j|k|l|m|n|ñ|p|q|r|s|t|v|w|y|z];
#--------------------------------#
# allow upper/lower case letters #
#--------------------------------#
define Lowercase [A (->) a, B (->) b, C (->) c,D (->) d,E (->) e,F (->) f,G (->) g,H (->) h,I (->) i,J (->) j,K (->) k,L (->) l,M (->) m,N (->) n,O (->) o,P (->) p,Q (->) q,R (->) r,S (->) s,T (->) t,U (->) u,V (->) v,W (->) w,X (->) x,Y (->) y,Z (->) z,Ñ (->) ñ,Ã (->) ã,Ĩ (->) ĩ,Õ (->) õ,Ẽ (->) ẽ,Ê (->) ê,Î (->) î,Ô (->) ô];
define UpperCase [ a (->) A,b (->) B,c (->) C,d (->) D,e (->) E,f (->) F,g (->) G,h (->) H,i (->) I,j (->) J,k (->) K,l (->) L,m (->) M,n (->) N,o (->) O,p (->) P,q (->) Q,r (->) R,s (->) S,t (->) T,u (->) U,v (->) V,w (->) W,x (->) X,y (->) Y,z (->) Z,ñ (->) Ñ,ã (->) Ã,ĩ (->) Ĩ,õ (->) Õ,ẽ (->) Ẽ,ê (->) Ê,î (->) Î,ô (->) Ô];
##########################
# Ortography #
# Normalization Patterns #
# #
##########################
define QUIReplacement [ {ky} (->) {qui} || _ [a|á] ];
define QYReplacement1 [ {ky} (->) {qy} || _ [a|á] ]; # qyaaryo -> kyaaryo
define QYReplacement2 [ {ki} (->) {qy} || _ [a|á] ]; # niyanqyaaqui -> niyankiaaki
define RYReplacement1 [ {ri} -> {ry}, {ri} -> {ri} || _ [a|á] ]; # ijananeryaate Pava -> ihananeriaate Pava
define QUReplacement [ {k} (->) {qu} || _ [e|i|é|í] ,, {k} (->) {qü} || _ [e|i|é|í] ];
define CReplacement1 [ {k} (->) {c} || _ [a|o|u|á|é|í] ];
define CReplacement2 [ {k} (->) {c} || [a|e|i|o|u|á|é|í] _ .#. ]; ! shac -> shak ; tac -> tak
! tec -> tek
! tzinic -> tzinik
define CReplacement3 [ {nk} -> {nc}, {nk} -> {nk} || [a|e|i|o|u|á|é|í] _ .#. ]; ! eenc -> eenk
#define QYReplacement [ {ky} (->) {qy} || _ [a] ];
define JReplacement1 [ {h} (->) {j} || Vowels _ Vowels ]; # not accepting sh -> sj
define JReplacement2 [ {h} (->) {j} || .#. _ Vowels ]; # changing ja -> ha at the beginning of a word
define JReplacement3 [ {h} (->) {j} || _ Vowels ]; # changing jemimimi -> jemimimi at the beginning of a word
define JReplacement4 [ {h} (->) {j} || _ [{ya}|{yi}] ]; # iraanajya -> iraanahya ; aajyitataantsi -> aahyitataantsi
define ZReplacement1 [ {s} (->) {z} || .#. _ Vowels ];
define BReplacement1 [ {v} (->) {b} || _ Vowels ];
define BReplacement2 [ {nv} (->) {mb} || _ Vowels ];
define WReplacement [ {v} (->) {w} || _ Vowels ];
define HUReplacement [ {v} (->) {hu} || _ [i|o] ]; ! kuhuinco -> kuvinco, shihuonso -> shivonso
define PIReplacement [ {py} (->) {pi} || _ [a|á] ];
define KIReplacement [ {ky} (->) {ki} || _ [a|á] ,, {ky} (->) {qy} || _ [a|á] ];
define KIReplacement2 [ {ky} -> {ki}, {ky} -> {ky} || _ [e|é] ];
define RIReplacement [ {ry} (->) {ri} || _ [a|á] ];
define TIReplacement [ {ty} -> {ti}, {ty} -> {ty} || _ [e|é] ];
# define THReplacement [ {ts} (->) {th} || _ [a|e|i|o|á|é|í|ó] ]; # xfst only ! thamiri -> tsamiri
define THReplacement [ {ts} -> {th}, {ts} -> {ts} || _ [a|e|i|o|á|é|í|ó] ];
define NYReplacement [ {ny} (->) {ñ} || _ Vowels ];
define VowelsWithAccent [ {a} (->) {á}, {a} (->) {à}, {e} (->) {é}, {e} (->) {è}, {i} (->) {í}, {i} (->) {ì},{o} (->) {ó},{o} (->) {ò}, {u} (->) {ú}];
define UReplacement1 [ {o} (->) {u} || [Cons] _ [Cons] ]; # ayumpari, kubantsi
define UReplacement2 [ {o} (->) {u} || [Cons] _ [a|e] ]; # kuakitzi, wuempo , kuaritotzi
define UReplacement3 [ {o} (->) {u} || [Cons] _ ]; # paju
define UReplacement4 [ {o} (->) {u} || .#. _ [Cons] ]; # upempe
define NPReplacement [ {mp} (->) {np} || [Vowels] _ [Vowels] ]; # amenpori
define RYReplacement [ {i} (->) {y} || [{r}] _ .#. ]; # -ry -> -ri
define TSYReplacement [ {i} (->) {y} || [{ts}] _ .#. ]; # -tsy -> -tsi
# onset before vowel a
define TYOnset1 [ {tey} -> {ty}, {tey} -> {tey} || _ [a|á] ]; ! tyaaki 'flower' -> teyaaki
define TYOnset2 [ {tiy} -> {ty}, {tiy} -> {tiy} || _ [a|á] ]; ! tyaaki 'flower' -> tiyaaki
define TYOnset3 [ {ti} -> {ty} || {n} _ [a|á] ]; ! ròmahontiáantakariri -> ròmahontyáantakariri
define PYOnset [ {piy} -> {py}, {piy} -> {piy} || _ [a|á] ]; ! pyari 'masato [manioc beer]' -> piyari
define SYOnset [ {siy} -> {sy}, {siy} -> {siy} || _ [a|á] ]; ! syatatsi 'claw, fingernail' -> siyatatsi
define TSYOnset [ {tsiy} -> {tsy}, {tsiy} -> {tsiy} || _ [a|á] ]; ! tsyairi 'paucar sp.' -> tsiyairi
define NYOnset [ {niy} -> {ny}, {niy} -> {niy} || _ [a|á] ]; ! kanyari 'green' -> kaniyari
define KYOnset [ {kiy} -> {ky}, {kiy} -> {kiy} || _ [a|á] ]; ! chochokyari -> chochokiyari
define VYOnset1 [ {vi} -> {vy} || _ [a|á] ]; ! áawianèro -> áawyanèro
define VYOnset2 [ {wi} -> {wy} || _ [a|á] ];
# ------------------------------------------
# Seen in Ashanĩka do Rio Amônia
# ------------------------------------------
# diphthong: ay
# wayro , DURATIVE suffix
define AYDiphthong1 [ {ai} (->) {ay} || [v] _ [Cons] ];
define AYDiphthong2 [ {ai} (->) {ay} || [v] _ .#. ];
# osaykanake
define AYDiphthong3 [ {ai} (->) {ay} || [s] _ [Cons] ];
define AYDiphthong4 [ {ai} (->) {ay} || [s] _ .#. ];
# TAYRI
define AYDiphthong5 [ {ai} (->) {ay} || [t] _ [Cons] ];
define AYDiphthong6 [ {ai} (->) {ay} || [t] _ .#. ];
# iranay
define AYDiphthong7 [ {ai} (->) {ay} || [n] _ [Cons] ];
define AYDiphthong8 [ {ai} (->) {ay} || [n] _ .#. ];
# athatane-payni
define AYDiphthong9 [ {ai} (->) {ay} || [p] _ [Cons] ];
define AYDiphthong10 [ {ai} (->) {ay} || [p] _ .#. ];
#
define EYDiphthong1 [ {ei} (->) {ey} || [t] _ [Cons] ];
# apaniroyni
define OYDiphthong1 [ {oi} (->) {oy} || [r] _ [Cons] ]; ! add {n} ???
define OYDiphthong2 [ {oi} (->) {oy} || [r] _ .#. ];
# Mawoyni
define OYDiphthong3 [ {oi} (->) {oy} || [v] _ [Cons] ];
define OYDiphthong4 [ {oi} (->) {oy} || [v] _ .#. ];
# Nokoy
define OYDiphthong5 [ {oi} (->) {oy} || [k] _ [Cons] ];
define OYDiphthong6 [ {oi} (->) {oy} || [k] _ .#. ];
# tilde (1) : ~
define ATildeReplacement1 [ {an} -> {ã}, {an} -> {an} || _ [k|t] ];
define ATildeReplacement2 [ {am} -> {ã}, {am} -> {am} || _ [p] ];
define ETildeReplacement1 [ {en} -> {ẽ}, {en} -> {en} || _ [k|t] ];
define ETildeReplacement2 [ {em} -> {ẽ}, {em} -> {em} || _ [p] ];
define ITildeReplacement1 [ {in} -> {ĩ}, {in} -> {in} || _ [k|t] ];
define ITildeReplacement2 [ {im} -> {ĩ}, {im} -> {im} || _ [p] ];
define OTildeReplacement1 [ {on} -> {õ}, {on} -> {on} || _ [k|t] ];
define OTildeReplacement2 [ {om} -> {õ}, {om} -> {om} || _ [p] ];
#
#
define NYTildeReplacement1 [ {in} (->) {ĩ} || _ [y] ];
define NYTildeReplacement2 [ {on} (->) {õ} || _ [y] ];
# ------------------------------------------
define Orthography [ QUIReplacement
.o. QYReplacement1 .o. QYReplacement2 .o. RYReplacement1
.o. QUReplacement .o. CReplacement1 .o. CReplacement2 .o. CReplacement3
.o. AYDiphthong1 .o. AYDiphthong2 .o. AYDiphthong3 .o. AYDiphthong4 .o. AYDiphthong5 .o. AYDiphthong6 .o. AYDiphthong7 .o. AYDiphthong8 .o. AYDiphthong9 .o. AYDiphthong10
.o. EYDiphthong1
.o. OYDiphthong1 .o. OYDiphthong2 .o. OYDiphthong3 .o. OYDiphthong4 .o. OYDiphthong5 .o. OYDiphthong6
.o. JReplacement1 .o. JReplacement2 .o. JReplacement3 .o. JReplacement4
.o. ZReplacement1
.o. BReplacement1 .o. BReplacement2 .o. WReplacement .o. HUReplacement
.o. PIReplacement .o. KIReplacement .o. KIReplacement2 .o. RIReplacement .o. TIReplacement .o. THReplacement .o. NYReplacement .o. VowelsWithAccent
.o. ATildeReplacement1 .o. ATildeReplacement2 .o. ETildeReplacement1 .o. ETildeReplacement2 .o. ITildeReplacement1 .o. ITildeReplacement2 .o. OTildeReplacement1 .o. OTildeReplacement2
.o. NYTildeReplacement1 .o. NYTildeReplacement2
.o. UReplacement1 .o. UReplacement2 .o. UReplacement3 .o. UReplacement4
.o. NPReplacement .o. RYReplacement .o. TSYReplacement
.o. TYOnset1 .o. TYOnset2 .o. TYOnset3 .o. PYOnset .o. KYOnset .o. VYOnset1 .o. VYOnset2
];