-
Notifications
You must be signed in to change notification settings - Fork 4
/
rules-gd.txt
166 lines (166 loc) · 5.23 KB
/
rules-gd.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
#######################################################
# an fhoirm cheart Gàidhlig a lorg i dtosach báire...
#######################################################
^([A-CEFGIJKLOPQRSU-ZÁÉÍÓÚÀÈÌÒÙ])([A-ZÁÉÍÓÚÀÈÌÒÙ'-]*[A-ZÁÉÍÓÚÀÈÌÒÙ][A-ZÁÉÍÓÚÀÈÌÒÙ'-]*)$ $1\L$2 -1
^D([A-GI-ZÁÉÍÓÚÀÈÌÒÙ][A-ZÁÉÍÓÚÀÈÌÒÙ'-]*)$ D\L$1 -1
^D(H[A-ZÁÉÍÓÚÀÈÌÒÙ][A-ZÁÉÍÓÚÀÈÌÒÙ'-]*)$ D\L$1 -1
^D'([AEIOUÁÉÍÓÚÀÈÌÒÙF])([A-ZÁÉÍÓÚÀÈÌÒÙ'-]*)$ d'$1\L$2 -1
^DH'([AEIOUÁÉÍÓÚÀÈÌÒÙF])([A-ZÁÉÍÓÚÀÈÌÒÙ'-]*)$ dh'$1\L$2 -1
^H([A-ZÁÉÍÓÚÀÈÌÒÙ][A-ZÁÉÍÓÚÀÈÌÒÙ'-]*)$ H\L$1 -1
^H-([A-ZÁÉÍÓÚÀÈÌÒÙ])([A-ZÁÉÍÓÚÀÈÌÒÙ'-]*)$ h-$1\L$2 -1
^M([A-ZÁÉÍÓÚÀÈÌÒÙF][A-ZÁÉÍÓÚÀÈÌÒÙ'-]*)$ M\L$1 -1
^M'([AEIOUÁÉÍÓÚÀÈÌÒÙF])([A-ZÁÉÍÓÚÀÈÌÒÙ'-]*)$ m'$1\L$2 -1
^N([A-ZÁÉÍÓÚÀÈÌÒÙ][A-ZÁÉÍÓÚÀÈÌÒÙ'-]*)$ N\L$1 -1
^N-([A-ZÁÉÍÓÚÀÈÌÒÙ])([A-ZÁÉÍÓÚÀÈÌÒÙ'-]*)$ n-$1\L$2 -1
^T([A-ZÁÉÍÓÚÀÈÌÒÙ][A-ZÁÉÍÓÚÀÈÌÒÙ'-]*)$ T\L$1 -1
^T-([AEIOUÁÉÍÓÚÀÈÌÒÙSHF])([A-ZÁÉÍÓÚÀÈÌÒÙ'-]*)$ t-$1\L$2 -1
([^_]{3})-([A-ZÁÉÍÓÚÀÈÌÒÙ]) $1-\l$2 -1
^'([A-ZÁÉÍÓÚÀÈÌÒÙ]) '\l$1 -1
^([A-ZÁÉÍÓÚÀÈÌÒÙ]) \l$1 -1
^d'([AEIOUÁÉÍÓÚÀÈÌÒÙF]) d'\l$1 -1
^dh'([AEIOUÁÉÍÓÚÀÈÌÒÙF]) d'\l$1 -1
# NB we *insert* hyphens here to search for gd form...
^h([AEIOUÁÉÍÓÚÀÈÌÒÙ]) h-$1 -1
^h-([AEIOUÁÉÍÓÚÀÈÌÒÙ]) h-\l$1 -1
^m'([AEIOUÁÉÍÓÚÀÈÌÒÙF]) m'\l$1 -1
^n([AEIOUÁÉÍÓÚÀÈÌÒÙ]) n-$1 -1
^n-([AEIOUÁÉÍÓÚÀÈÌÒÙ]) n-\l$1 -1
^t([AEIOUÁÉÍÓÚÀÈÌÒÙSHF]) t-$1 -1
^t-([AEIOUÁÉÍÓÚÀÈÌÒÙSHF]) t-\l$1 -1
# Co-Òrdanaiche => co-òrdanaiche
(..)-([A-ZÁÉÍÓÚÀÈÌÒÙ]) $1-\l$2 -1
# hand-in-hand with code for reading in multi-xx...
# always adds a fully lowercased version to hash
^(.*[A-ZÁÉÍÓÚÀÈÌÒÙÇ].*_.+)$ \L$1 1
^(.+_.*[A-ZÁÉÍÓÚÀÈÌÒÙÇ].*)$ \L$1 1
^ard- àrd- 2
^(bh?)eo- $1eò- 2
^(ch?)lar- $1làr- 2
^(ch?)lo- $1lò- 2
^(ch?)oi- $1o- 1
^(ch?)omh- $1o- 1
^(dh?)a- $1à- 2
^(dh?)eadh $1eagh 1
^(dh?)èagh $1eagh 1
^d' dh' 1
^(dh?)i- $1ì- 2
^(dh?)luth- $1lùth- 2
^(dh?)oigh- $1òigh- 2
^(fh?)ein- $1èin- 2
^(fh?)ior- $1ìor- 2
^(gh?)earr- $1eàrr- 2
^iomadh ioma 1
^lan- làn- 1
^(mh?)eadhon $1eadhan 1
^(mh?)i- $1ì- 2
^(mh?)ìon- $1ion- 2
^(mh?)or- $1òr- 2
^(ph?)riomh- $1rìomh- 2
^rum- rùm- 2
^(sh?)ar- $1àr- 2
^(sh?)ior- $1ìor- 2
^(sh?)eomar- $1eòmar- 2
^(th?)imchioll $1imcheall 1
^(th?)ir- $1ìr- 2
^(th?)ri- $1rì- 2
^ts t-s 2
^ùr- ur- 2
^droch-(..) droch_$1 1
^sàr-(..) sàr_$1 1
^seann-(..) seann_$1 1
^a'(...) a'_$1 1
^t'([aeiouáéíóúàèìòùf].) d'$1 1
^h([AEIOUÀÈÌÒÙÁÉÍÓÚaeiouàèìòùáéíóú]..) h-$1 2
([^t])-san$ $1san 1
# atharraichidhean -> atharrachaidhean
ichidhean$ chaidhean 1
# beannuichte -> beannaichte, òrduichibh -> òrdaichibh, shocruich -> shocraich
uich aich 1
# leagte->leagta, seargte->seargta, taghte->taghta, glacte->glacta
te$ ta 1
# GOC conventions; these coincide with gd->ga rules so no fear of infinite loop
# usbag->uspag
sb sp 1
# aosda->aosta
sd st 1
# sagartaibh => sagartan
(..)aibh$ $1an 1
# chàirdibh => chàirdean
(.[^aeiou])ibh$ $1ean 1
# sc->sg is the other rule of this kind, but moves away from ga so think twice
# Decided to include the following rules here vs. the opposite rules
# in the section below because we're much more likely to "find" the
# source word through rules than we are to luck out and hit the ga word.
# Plus the gd sources are pretty noisy.
# Plus I surveyed gd->ga pairs obtained by making accents acute and made
# sure to include those in gd2ga.po
á à 1
é è 1
í ì 1
ó ò 1
ú ù 1
Á À 1
É È 1
Í Ì 1
Ó Ò 1
Ú Ù 1
# don't do this with initial h- n- t- etc.; see cap rules above
# (also a potential infinite loop b/c of ts->t-s rule above)
(..)- $1 1
#######################################################
# ansin iarracht ar fhocal sa sprioctheanga a aimsiú...
#######################################################
^([0-9]+0)e?an$ $1í 1
^([1-9][0-9]*)a?mh$ $1ú 1
# gd has t-17mh, t-8mh => ga 17ú, 8ú
^t-([1-9][0-9]*)a?mh$ $1ú 1
^0([0-9])mh$ $1ú 1
# creuchd->créacht, deug->déag, sgeul->scéal
eu éa 1
# ceòl->ceol, beò->beo, beòir->beoir, eòlas->eolas
eò eo 1
# beàrnach->bearnach, ceàrnach->cearnach, ceàrr->cearr
eà ea 1
sg sc 1
sd st 1
# ochd->ocht, uchd->ucht, bochd->bocht, and all achd$->acht
achd acht 1
# comhairleachadh->comhairliú
eachadh iú 1
# ceadachadh->ceadú,
achadh ú 1
# àrsaidheachd->ársaíocht, buidheach->buíoch,
# rannaigheachd->rannaíocht
i[dg]hea ío 1
# siubhail->siúil, triubhas->triús
ubha ú 1
# eireag->eireog
eag$ eog 1
# feadag->feadóg
([^e])ag $1óg 1
# eòlaiche->eolaí, gadaiche->gadaí
iche$ í 1
# suimeil->suimiúil, taibhseil->taibhsiúil
eil$ iúil 1
# gineadair->gineadóir, glacadair->glacadóir, leantair->leantóir
air$ óir 1
# not ^àrd => ard since we go in opposite direction above
# similarly, don't bother with làn-, mì-, mòr-, prìomh-, etc. here
^(ch?)o- $1omh 1
^(dh?)eagh- $1ea- 1
^eadar- idir 1
^leth- leath 1
#^(mh?)ì- $1í- 1
^neo- neamh- 1
^ro-mh réamh-mh 1
^ro-([^m]) réamh$1 1
#à á 1
#è é 1
#è í 1
#ò ó 1
#ù ú 1
#À Á 1
#È É 1
#Ì Í 1
#Ò Ó 1
#Ù Ú 1