# morph-ga.txt: Morphology rules for Irish.
# Copyright (C) 2004 Kevin P. Scannell <scannell@slu.edu>
#
# This is free software; see the file COPYING for copying conditions.  There
# is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.
#
#  with the exception of some of the non-standard verb endings,
#  each rule decreases number of caps or length => recursion will stop.
#
#  each substitution is applied globally (though this is only relevant
#  for the few rules that aren't anchored at ^ or $
#
#  There is no need to encode the regular inflectional morphology of 
#  Irish here because it is already handled by the C++ code that generates
#  the basic lexicon.   So if "imirceacha" is not in the lexicon (it is)
#  "imirceach" won't be either.   On the other hand it can be quite useful
#  to include *derivational* morphology; so if "gaimbíneachas" is not
#  in the lexicon (it is) there is some hope that by stripping the 
#  "eachas" it will find the root "gaimbín".
^BP			bP		1	<.+>
^BHF			bhF		1	<.+>
^DT			dT		1	<.+>
^GC			gC		1	<.+>
^MB			mB		1	<.+>
^ND			nD		1	<.+>
^NG			nG		1	<.+>
^TS			tS		1	<.+>
^([A-ZÁÉÍÓÚ])([A-ZÁÉÍÓÚ'-]*[A-ZÁÉÍÓÚ][A-ZÁÉÍÓÚ'-]*)$	$1\L$2		-1	 <.+>	# GAELTACHT but not "D'" (after recursion)
^([A-ZÁÉÍÓÚ])		\l$1		-1	<.+> 	# Príomhach
(...)-([A-ZÁÉÍÓÚ])	$1-\l$2		-1	<.+> 	# Príomh-Aire
^b'([AEIOUÁÉÍÓÚF])	b'\l$1		-1	<.+>
^bP([A-ZÁÉÍÓÚ'-]+)$	bp\L$1		-1	<.+>	# bPRÍOMH-AIRE
^bP			bp		-1	<.+>	# bPríomhach
^bhF([A-ZÁÉÍÓÚ'-]+)$	bhf\L$1		-1	<.+>
^bhF			bhf		-1	<.+>
^d'([AEIOUÁÉÍÓÚF])	d'\l$1		-1	<.+>
^dT([A-ZÁÉÍÓÚ'-]+)$	dt\L$1		-1	<.+>
^dT			dt		-1	<.+>
^gC([A-ZÁÉÍÓÚ'-]+)$	gc\L$1		-1	<.+>
^gC			gc		-1	<.+>
^h([AEIOUÁÉÍÓÚ])([A-ZÁÉÍÓÚ'-]+)$	h$1\L$2	-1	<.+>	# hÉIREANN
^h([AEIOUÁÉÍÓÚ])	h\l$1		-1	<.+>
^m'([AEIOUÁÉÍÓÚF])	m'\l$1		-1	<.+>
^mB([A-ZÁÉÍÓÚ'-]+)$	mb\L$1		-1	<.+>
^mB			mb		-1	<.+>
^n([AEIOUÁÉÍÓÚ])([A-ZÁÉÍÓÚ'-]+)$	n$1\L$2	-1	<.+>
^n([AEIOUÁÉÍÓÚ])	n-\l$1		-1	<.+>
^nD([A-ZÁÉÍÓÚ'-]+)$	nd\L$1		-1	<.+>
^nD			nd		-1	<.+>
^nG([A-ZÁÉÍÓÚ'-]+)$	ng\L$1		-1	<.+>
^nG			ng		-1	<.+>
^tS([A-ZÁÉÍÓÚ'-]+)$	ts\L$1		-1	<.+>
^tS			ts		-1	<.+>
^t([AEIOUÁÉÍÓÚ])([A-ZÁÉÍÓÚ'-]+)$	t$1\L$2	-1	<N.*>	# tUASAL
^t([AEIOUÁÉÍÓÚ])	t-\l$1		-1	<N.*>
# these aren't in aspell db by default; better to do early (mb'amhlaidh)
^mb'			b'		-1	<.+>
# hyphened prefixes, an-, dea-
^h?an-([bcfgmp]h)	$1		0	<[AN].*>
^h?an-([bcfgmp][^h])	$1		2	<[AN].*>
^h?an-([^bcfgmp][^h])	$1		0	<[AN].*>
^h?an-([^bcfgmp]h)	$1		2	<[AN].*>   # an-dhuine 
^dea-([bcdfgmpt]h)	$1		0	<[AN].*>
^dea-([bcdfgmpt][^h])	$1		2	<[AN].*>
^dea-(sh[aeiouáéíóúlnr])	$1	0	<[AN].*>
^dea-(s[aeiouáéíóúlnr])	$1		2	<[AN].*>
^dea-(s[^aeiouáéíóúlnrh])	$1	0	<[AN].*>   # dea-scéal
^dea-([^bcdfgmpst])	$1		0	<[AN].*>
# other prefixes; most are not independent words (ath, comh, etc.)
# but several are -- these are worth including for several reasons:
# (1) efficiency; morph. analysis happens well before the check for
#  compounds/run-togethers (2) allows for a more refined check for
#  lenition of the prefixed word or other changes (comh-mh, comh->có, etc.)
^h?ain([deéiílnrst])	$1		0	<[AN].*>
^h?ain([bcfgmp]h)	$1		0	<[AN].*>
^h?ath([^bcdfgmpst-])	$1		0	<[ANV].*>
^h?ath([bcdfgmp]h)	$1		0	<[ANV].*>
^h?ath(sh[aeiouáéíóúlnr])	$1		0	<[ANV].*>
^h?ath(s[^aeiouáéíóúlnrh])	$1	0	<[ANV].*>
^h?ath-?th		at		1	<[ANV].*>
^h?ath-?th		th		1	<[ANV].*>
^comh([^bcdfgmnpst-])	$1		0	<[ANV].*>
^comh([bcdfgpt]h)	$1		0	<[ANV].*>
^comh(sh[aeiouáéíóúlnr])	$1	0	<[ANV].*>
^comh(s[^aeiouáéíóúlnrh])	$1	0	<[ANV].*>
^có(mh[aáoóuú])		$1		0	<[ANV].*>
^cói(mh[eéií])		$1		0	<[ANV].*>
^có(n[aáoóuú])		$1		0	<[ANV].*>
^cói(n[eéií])		$1		0	<[ANV].*>
^coimh-mh		cóimh		1	<[ANV].*>
^comh-mh		mh		1	<[ANV].*>
^co(i?)mh-?n		có$1n		1	<[ANV].*>
^có-(..)		comh$1		1	<[ANV].*>
^có([bcdfgpt]h)		comh$1		1	<[ANV].*>
^do-([aeiouáéíóú])	$1		0	<[AN].*>
# ^do([lnr]) BELOW
^do([bcdfgmpt]h)	$1		0	<[AN].*>
^do(sh[aeiouáéíóúlnr])	$1		0	<[AN].*>
^do(s[^aeiouáéíóúlnrh])	$1		0	<[AN].*>
^do-([aeiouáéíóú])	$1		0	<[ANV].*>
^droch([^bcdfgmpst-])	$1		0	<[AN].*>
^droch-(ch)		$1		0	<[AN].*>
^droch([bdfgmpt]h)	$1		0	<[AN].*>
^droch(sh[aeiouáéíóúlnr])	$1		0	<[AN].*>
^droch(s[^aeiouáéíóúlnrh])	$1		0	<[AN].*>
^fíor([^bcdfgmprst-])	$1		0	<[ANV].*>
^fíor-(r)		$1		0	<[ANV].*>
^fíor([bcdfgmpt]h)	$1		0	<[ANV].*>
^fíor(sh[aeiouáéíóúlnr])	$1		0	<[ANV].*>
^fíor(s[^aeiouáéíóúlnrh])	$1		0	<[ANV].*>
^for([^bcdfgmprst-])	$1		0	<[ANV].*>
^for-(r)		$1		0	<[ANV].*>
^for([bcdfgmpt]h)	$1		0	<[ANV].*>
^for(sh[aeiouáéíóúlnr])	$1		0	<[ANV].*>
^for(s[^aeiouáéíóúlnrh])	$1		0	<[ANV].*>
^fo-([aeiouáéíóú])	$1		0	<[ANV].*>
# ^fo([lnr]) BELOW
^fo([bcdfgmpt]h)	$1		0	<[ANV].*>
^fo(sh[aeiouáéíóúlnr])	$1		0	<[ANV].*>
^fo(s[^aeiouáéíóúlnrh])	$1		0	<[ANV].*>
^fo-(..)		$1		1	<[ANV].*>
^frith([^bcdfgmpst-])	$1		0	<[ANV].*>
^fri(t[^h])		$1		0	<[ANV].*>
^frith([bcdfgmp]h)	$1		0	<[ANV].*>
^frith(sh[aeiouáéíóúlnr])	$1		0	<[ANV].*>
^frith(s[^aeiouáéíóúlnrh])	$1		0	<[ANV].*>
^h?iar([^bcdfgmprst-])	$1		0	<[ANV].*>
^h?iar-(r)		$1		0	<[ANV].*>
^h?iar([bcdfgmpt]h)	$1		0	<[ANV].*>
^h?iar(sh[aeiouáéíóúlnr])	$1		0	<[ANV].*>
^h?iar(s[^aeiouáéíóúlnrh])	$1		0	<[ANV].*>
# ilsiamsa, ilsiollach, etc.  no special case
^h?il([^bcfgmp-]..)	$1		0	<[AN].*>
^h?il([bcfgmp]h.)	$1		0	<[AN].*>
^h?im([^bcdfghmpst-]..)	$1		0	<[ANV].*>
^h?im([bcdfgmpt]h.)	$1		0	<[ANV].*>
^h?im(sh[aeiouáéíóúlnr])	$1		0	<[ANV].*>
^h?im(s[^aeiouáéíóúlnrh].)	$1		0	<[ANV].*>
# ^in([^bcfgmp-]) BELOW
^h?in-(n)		$1		0	<[AN].*>
^h?in([bcfgmp]h..)	$1		0	<[AN].*>
^leas-(s)		$1		0	<[AN].*>
^leas([aeiouáéíóúd]..)	$1		0	<[AN].*>
^leas([bcfgm]h..)	$1		0	<[AN].*>
^mí-([aeiouáéíóú])	$1		0	<[ANV].*>
^mí([aeiouáéíóú]..)	$1		2	<[ANV].*>  # míúsáid
^mí([lnr]..)		$1		0	<[ANV].*>
^mí([bcdfgmpt]h.)	$1		0	<[ANV].*>
^mí(sh[aeiouáéíóúlnr])	$1		0	<[ANV].*>
^mí(s[^aeiouáéíóúlnrh])	$1		0	<[ANV].*>
^neamh-?([aeiouáéíóú])	$1		0	<[ANV].*>  # neamh-aistear but neamhaithne
^neamh([lnr])		$1		0	<[ANV].*>
^neamh([bcdfgpt]h)	$1		0	<[ANV].*>
^neamh-(mh)		$1		0	<[ANV].*>
^neamh(sh[aeiouáéíóúlnr])	$1	0	<[ANV].*>
^neamh(s[^aeiouáéíóúlnrh])	$1	0	<[ANV].*>
^príomh([^bcdfgmpst-])	$1		0	<N.*>
^príomh([bcdfgpt]h)	$1		0	<N.*>
^príomh-(mh)		$1		0	<N.*>
^príomh(sh[aeiouáéíóúlnr])	$1		0	<N.*>
^príomh(s[^aeiouáéíóúlnrh])	$1		0	<N.*>
^réamh([^bcdfgmpst-])	$1		0	<[ANV].*>
^réamh([bcdfgpt]h)	$1		0	<[ANV].*>
^réamh-(mh)		$1		0	<[ANV].*>
^réamh(sh[aeiouáéíóúlnr])	$1		0	<[ANV].*>
^réamh(s[^aeiouáéíóúlnrh])	$1		0	<[ANV].*>
^rí([lnr]..)		$1		0	<[ANV].*>
^rí([bcdfgmpt]h.)	$1		0	<[ANV].*>
^rí(sh[aeiouáéíóúlnr])	$1		0	<[ANV].*>
^rí(s[^aeiouáéíóúlnrh])	$1		0	<[ANV].*>
^ró-([aeiouáéíóú]..)	$1		0	<[AN].*>
^ró([aeiouáéíóú]..)	$1		2	<[AN].*>
^ró([lnr]..)		$1		0	<[AN].*>
^ró([bcdfgmpt]h.)	$1		0	<[AN].*>
^ró(sh[aeiouáéíóúlnr])	$1		0	<[AN].*>
^ró(s[^aeiouáéíóúlnrh])	$1		0	<[AN].*>
^sain([^bcdfgmpst-])	$1		0	<[ANV].*>
^sain([bcdfgmpt]h)	$1		0	<[ANV].*>
^sain(sh[aeiouáéíóúlnr])	$1		0	<[ANV].*>
^sain(s[^aeiouáéíóúlnrh])	$1		0	<[ANV].*>
^so-([aeiouáéíóú]..)	$1		0	<[AN].*>
^so([lnr]..)		$1		0	<[AN].*>
^so([bcdfgmpt]h.)	$1		0	<[AN].*>
^so(sh[aeiouáéíóúlnr].)	$1		0	<[AN].*>
^so(s[^aeiouáéíóúlnrh]..)	$1		0	<[AN].*>
^tras([^bcfghmnps-])	$1		0	<[ANV].*>   # leave "^trasn" alone
^tras([bcfgmp]h)	$1		0	<[ANV].*>
^tras-(s)		$1		0	<[ANV].*>
# next batch are non-words so really need to be here, but VERY infrequent
^(cil|gig|h?is|meig|micr|pic|teil)ea-?([^aeiouáéíóú-]+[aouáóú])	$2	0	 <.+>
^(cil|gig|h?is|meig|micr|pic|teil)i-?([^aeiouáéíóú-]+[eiéí])	$2	0	 <.+>
^(h?ant|fót|nan|par|pol|h?ultr)a-?([^aeiouáéíóú-]+[aouáóú])		$2	0	 <.+>
^(h?ant|fót|nan|par|pol|h?ultr)ai-?([^aeiouáéíóú-]+[eiéí])		$2	0	<.+>
^(h?eachtar|freas|h?íos|neas|réalt|tob|h?uas|h?uath)-?([^-])		$2	0	 <.+>
#  derivational morphology
([ao])chai?s$		$1ch		0	<A pl="n" gnt="n".*>
acht$			ach		0	<A pl="n" gnt="n".*>
([ao])chtaí$		$1cht		1	<N pl="n" gnt="n".*>
íocht$			íoch		0	<A pl="n" gnt="n".*>
úlachta?$		úil		0	<A pl="n" gnt="n".*> # CO p.120
úchái?n$		ú		0	<N.*>
# but actually non-standard if it's gs or pp; general  uith -> aith below
uithe$			ú		0	<N.*>
#############################################################################
################## CAIGHDEÁN OIFIGIÚIL SPELLING REFORMS #####################
#############################################################################
#   modernize prefixes (no need to trap mutated versions, stripped below
^h?aith			ath		1	<.+>
^h?eadar		idir		1	<.+>
^dh'			d'		1	<.+>
^h-			h		1	<.+>    # CO p.126
^n-([AEIOUÁÉÍÓÚ])	n$1		1	<.+>    # CO p.125
^t-([AEIOUÁÉÍÓÚ])	t$1		1	<.+>    # CO p.125
^h?ana-			an-		1	<.+>    # ana-eagraithe
^coimh			comh		1	<.+>    # coimhlíonadh
^de[ai]gh		dea		1	<.+>
^dligh(i?)		dlí		1	<.+>
^duibh			dubh		1	<.+>
^h?ion			in		1	<.+>
^maill			mall		1	<.+>
^nea-mb			neamhbh		1	<.+>
^nea-			neamh-		1	<.+>    # strip hyphen later
^nea([cdfgpt]h)		neamh$1		1	<.+>
^h?óig			óg		1	<.+>
^prímh			príomh		1	<.+>
^réimh			réamh		1	<.+>
^roimh			réamh		1	<.+>
^seana-			sean-		1	<.+>    # strip hyphen later
^tele([^aeiouáéíóú]+[eéií])	teili$1		1	<.+>    # OD77
^tele([^aeiouáéíóú]+[aáoóuú])	teilea$1	1	<.+>
^h?uaith		uath		1	<.+>
^h?úir			úr		1	<.+>
#   Now various general spelling reforms from CO handbook
ai(cht?ín)		a$1		1	<.+>    # CO p.120, smaichtín
sg			sc		1	<.+>    # CO p.115
sb			sp		1	<.+>    # CO p.115
sd			st		1	<.+>    # CO p.115
dn			nn		1	<.+>    # CO p.114 céadna
é(ir[ld])		e$1		1	<.+>    # CO p.123
á(i?r[dlnr])		a$1		1	<.+>    # CO p.123-124
ó(i?r[dlnr])		o$1		1	<.+>    # CO p.123-124
ú(i?r[dlnr])		u$1		1	<.+>    # CO p.123-124
eó			eo		1	<.+>    # go leór, etc.
eamhail$		iúil		1	<[AN].*>    # dlightheamhail
eamhla			iúla		1	<[AN].*>
([^e])amhail$		$1úil		1	<[AN].*>    # CO p.102, a2+barúil, etc.
([^e])amhla		$1úla		1	<[AN].*>    # "-amhlachta?" too
aíle$			aíola		1	<.+>    # *3ú* decl.
aibh$			a		1	<.+>    # fearaibh, fiachaibh
([^a])ibh$		$1e		1	<.+>    # coinnibh, etc.
(.)eu			$1éa		1	<.+>    # sgeul, ceudna, srl.
tch			t		1	<.+>    # CO p.103
i[dg]hea		ío		1	<.+>    # CO p.105,107
i[dg]he			í		1	<.+>    # CO p.104,106
uí([mto])		aí$1		1	<.+>	# cialluíonn, ionaduíochta, leasuítear, mionnuím
uith			aith		1	<.+>    # rialuitheoir
adha			ú		1	<.+>    # CO p.105
ádh			á		1	<.+>    # ádhbhar, rádh, etc.
[mb]hth			f		1	<.+>    # CO p.106
th[mb]h			f		1	<.+>    # CO p.106
ghai			aí		1	<.+>    # CO p.107
thch			ch		1	<.+>    # CO p.108
tht			t		1	<.+>    # CO p.108
ll([rst])		l$1		1	<.+>    # CO p.112-113
nn([cdlrst])		n$1		1	<.+>    # CO p.114
ghail$			aíl		1	<N pl="n" gnt="n" gnd="f".*>
ghaile$			aíola		1	<N pl="n" gnt="y" gnd="f".*>
ighil$			íl		1	<N pl="n" gnt="n" gnd="f".*>
ighile$			íola		1	<N pl="n" gnt="y" gnd="f".*>
(ain|é[ai]|iar)gc	$1g		1	<.+>    # CO p.109
(é[ai])dt		$1d		1	<.+>    # CO p.109
(dh?í?)omb		$1om		1	<.+>    # CO p.109
(ai?n)bhf		$1bh		1	<.+>    # CO p.109  ainbhfiosach
(..)u(i?s)$		$1a$2		1	<.+>    # solus, árus, etc.
#   some dialect/pre-standard noun/adjective inflections
([oó]ga)í$		$1		1	<N pl="y".*>   # duilleogaí
nnaí$			nna		1	<N pl="y".*>   # ceisteannaí
thaí$			tha		1	<.+>    # glórthaí, spéarthaí
(..)dha$		$1tha		1	<.+>    # measardha, muinteardha
(..)dha$		$1a		1	<.+>    # stuamdha, príomhdha
(.[aá])igh$		$1ch		1	<N.*>	# nb2 -aí genitives
(..)igh$		$1each		1	<N.*>   #  same
(..)aidh$		$1a		1	<.+>    # bhfágaidh
óig$			óg		1	<N.*>   # nb2 
lainn$			lann		1	<N.*>   # nb2
aisí$			ais		1	<N.*>   # cuntaisí, bronntanaisí
dth([ea])$		dt$1		1	<.+>    # goidthe
##################  NON/PRE-STANDARD VERB ENDINGS #########################
# future/conditional 2nd declension with -cha?- see CO p.103
e[oó]cha(i?dh)$		eo$1		1	<V.*>
([^e])ócha(i?dh)$	$1ó$2		1	<V.*>
e[oó]chaimi([ds])$	eoimi$1		1	<V.*>
([^e])óchaimi([ds])$	$1óimi$2	1	<V.*>
e[oó]chai(nn|dís)$	eoi$1		1	<V p="y" t="coinn">
([^e])óchai(nn|dís)$	$1ói$2		1	<V p="y" t="coinn">
#   2nd declension Dinneen-style endings
u(i?gh)			a$1		1	<.+>  # see next few
(..)aíd$		$1aíonn		1	<V p="y" t="láith"> # cialluíd
aghadh			ú		1	<N.*>  # broad and slender
i[dg]h(th?.)		i$1		1	<.+>  # marcaidhthe, masluighthe, beannuighth?ear
(..)thear$		$1tear		1	<V.*> # aut. present
ighim			ím		1	<V.*>    # broad and slender
ighidh			í		1	<.+>    # subjunctive?
ighinn			ínn		1	<.+>    # imperfect
# Future forms: see OS88 p.215 for these (fe?as, etc. on p.63), also CB p.145
#  socróid, dílseoid, 3rd plural forms in achtanna
fa[ds]$			faidh		1	<V p="y" t="fáist">
fea[ds]$		fidh		1	<V p="y" t="fáist">
ói?[ds]$		óidh		1	<V p="y" t="fáist">
eoi?[ds]$		eoidh		1	<V p="y" t="fáist">
# Common in achtanna to have -fidh,-fid ending on broad stem, lots of 
# other slender/broad mismatches:
([aáoóuú][^aeiouáéíóú]*)fí$	$1faí	1	<V p="n" t="coinn">
([aáoóuú][^aeiouáéíóú]*)fidh?$	$1faidh	1	<V p="y" t="fáist">
([eéií][^aeiouáéíóú]*)fa(r|dh)$	$1fea$2	1	<V p="." t="coinn">
([eéií][^aeiouáéíóú]*)tar$	$1tear	1	<V p="n" t="láith"> # * not + for chítar
# Future 2nd p., "r" forms noted on OS88 p.216;
# see achtanna for íocfaid/íocfa, bainfid/bainfe
fa$			faidh		1	<V p="y" t="fáist">
fai[rsd]$		faidh		1	<V p="y" t="fáist">
fe$			fidh		1	<V p="y" t="fáist">
fi[rsd]$		fidh		1	<V p="y" t="fáist">
óis$			óidh		1	<V p="y" t="fáist">
eois$			eoidh		1	<V p="y" t="fáist">
# Future/Cond autonomous; unwanted prefix h is common in achtanna
^h([aeiouáéíóú].+fe?ar)$	$1	1	<V p="n" t="fáist">
^h([aeiouáéíóú].+fa?í)$		$1	1	<V p="n" t="coinn">
# Past; also see Di27 (present).  "r" forms on p.216 (also CB p.145 present)
(...)eas$		$1		1	<V p="y" t="caite">
(..[^aeiouáéíóú])as$	$1		1	<V p="y" t="caite">
(...)íos$		$1igh		1	<V p="y" t="caite">
(...)ai[rs]$		$1		1	<V p="y" t="caite">
(..[^aeiouáéíóú])i[rs]$	$1		1	<V p="y" t="caite">
(...)ís$		$1igh		1	<V p="y" t="caite">
#  present
ains$			ann		1	<V p="y" t="láith">
ins$			eann		1	<V p="y" t="láith">
íns$			íonn		1	<V p="y" t="láith">
#  OS88 p.126  present
anns$			ann		1	<V p="y" t="láith">
íonns$			íonn		1	<V p="y" t="láith">
#  corpus 
th(eá|ear)$		t$1		1	<V.*>
(..)faimís$		$1faimis	2	<V p="y" t="coinn">
#  various -áil  endings should be broad, CO p.120
áilim$			álaim		1	<V.*>
áileann$		álann		1	<V.*>
áilfidh$		álfaidh		1	<V.*>
áilfeá$			álfá		1	<V.*>
áilfear$		álfar		1	<V.*>
áilfí$			álfaí		1	<V.*>
ái(lf?)eadh$		á$1adh		1	<V.*>
ái(lf?)im(i[sd])$	á$1aim$2	1	<V.*>
áiligí$			álaigí		1	<V.*>
áilea([dm]ar)$		ála$1		1	<V.*>
ái(lf?)idís$		á$1aidís	1	<V.*>
áltar$			áiltear		1	<V.*>
álta$			áilte		1	<A.*>
álanna$			álacha		1	<N.*>  # nb3 pl
#############################################################################
#  emphatic suffixes
(.[aouáóú])(san?|na)$	$1		0	<[NV].*>
(.[eiéí])(sean|[sn]e)$	$1		0	<[NV].*>
([aouáóú][^aeiouáéíóú-]*[^aeiouáéíóús-])san?$	$1	0	<[NV].*>
([aouáóú][^aeiouáéíóú-]*[^aeiouáéíóún-])na$	$1	0	<[NV].*>
([eiéí][^aeiouáéíóú-]*[^aeiouáéíóús-])se(an)?$	$1	0	<[NV].*>
([eiéí][^aeiouáéíóú-]*[^aeiouáéíóún-])ne$	$1	0	<[NV].*>
([aouáóú][^aeiouáéíóú-]*s)-san?$		$1	0	<[NV].*>
([aouáóú][^aeiouáéíóú-]*n)-na$			$1	0	<[NV].*>
([eiéí][^aeiouáéíóú-]*s)-se(an)?$		$1	0	<[NV].*>
([eiéí][^aeiouáéíóú-]*n)-ne$			$1	0	<[NV].*>
#############################################################################
#   common spelling errors
uil$			úil		2	<A.*>
ula$			úla		2	<A.*>
eail$			eáil		2	<.+>    # common missing accent
u$			ú		2	<N.*>
# i$			í		2	<.+>  # lotsa false compounds with this
#############################################################################
#  rules with somewhat lower probability (e.g. fo-, must be after non-stnd
#  verb endings to avoid "foluíonn"  parsing as "fo+luíonn"
^do([lnr]..)		$1		0	<[AN].*>
^fo([lnr]..)		$1		0	<[ANV].*>
^h?in([^bcfgmp-]..)	$1		0	<[AN].*>
# last resort for weird caps
([A-ZÁÉÍÓÚ])		\l$1		2	<.+>	# pRíOMhach
([eiéí][^aeiouáéíóú]+)íní?$	$1		0	<.+>	# diminutive
([aouáóú][^aeiouáéíóú]+)íní?$	$1		2	<.+>	# diminutive
([óo])igíní?$		$1g		0	<N.*>
#  the next rule handles a lot of stuff, including unwanted hyphens
#  after prefixes (since the prefix rules will apply after recursing)
#  and similarly unwanted hyphens before emphatic endings (CO p.126)
(.)-			$1		1	<.+>       # ró-bheag / róbheag
# delenite, de-eclipse.  
# Only helps when we recurse and find a standard unmutated prefix above!
^bp([^h])		p$1		0	<[ANV].*>
^bhf([^h])		f$1		0	<[ANV].*>
^dt([^h])		t$1		0	<[ANV].*>
^gc([^h])		c$1		0	<[ANV].*>
^mb([^h])		b$1		0	<[ANV].*>
^nd([^h])		d$1		0	<[ANV].*>
^ng([^h])		g$1		0	<[ANV].*>
^ts([^h])		s$1		0	<[ANV].*>
^([bcdfgmpBCDFGMP])h	$1		0	<[ANVY].*>
^([Tt])h([^s])		$1$2		0	<[ANVY].*>   # luathscéal danger
^([Ss])h([lnraeiouáéíóú])	$1$2	0	<[ANVY].*>
^t'([AEIOUÁÉÍÓÚaeiouáéíóú]|[Ff]h)	d'$1	1	<[ANVY].*>	# t'athair
^[bdm]'([AEIOUÁÉÍÓÚaeiouáéíóú]|[Ff]h)	$1	0	<[ANVY].*>	# d'Éamonn too
^[nt]-([aeiouáéíóú])	$1		0	<[ANV].*>
