Blame igcheck

Packit 8140f7
## This shell script checks a list of words for potential
Packit 8140f7
## spelling problems.  It is provided for your hacking pleasure.
Packit 8140f7
##
Packit 8140f7
## It is designed to work with a raw list of words, one per line.
Packit 8140f7
## % igcheck <wordlist>
Packit 8140f7
##
Packit 8140f7
## Uncomment the last couple of lines if you have time to browse
Packit 8140f7
## through the (usually legal) violations of 
Packit 8140f7
## "broad with broad", "slender with slender"
Packit 8140f7
Packit 8140f7
### ODD LETTERS
Packit 8140f7
echo 'Checking for non-alphabetic characters...'
Packit 8140f7
cat $1 | egrep "[^a-zA-ZáéíóúÁÉÍÓÚ'\-]"
Packit 8140f7
Packit 8140f7
### LENITION and VOWELS
Packit 8140f7
echo 'Checking lenition...'
Packit 8140f7
cat $1 | egrep '[aeiouáéíóúhjlnrvxz]h' | egrep -v '[aeiouáéíóú]h[aeiouáéíóú]' | egrep -v 'Fh?aranhaít' | egrep -v '^g?Ch?óbanhávan' | egrep -v "^([bdm]')?fhorhalla" | egrep -v '(bh)?forhalla' | egrep -v 'n?gh?ealhataí?$' | egrep -v "^([bdm]'|h|[nt]-)?unnailheicsiam" | egrep -v '^g?ch?úlhaist'
Packit 8140f7
cat $1 | egrep 'sh[^aeiouáéíóúlnr]'
Packit 8140f7
## check for eclipsis and lenition of same consonant
Packit 8140f7
## so it suffices to check m?bh? later...
Packit 8140f7
cat $1 | egrep 'm[bB]h' | egrep -v "^([bdm]'|h|[nt]-)?io?mbh" | egrep -v "^(d?th?rombhua|g?ch?ambh|([bdm]'|bh)?fh?uaimbhai?c)"
Packit 8140f7
cat $1 | egrep 'n[dD]h' | egrep -v 'fh?lanndhe[ai]rg([ae])?$' | egrep -v '^d?th?eanndháileoi?g'
Packit 8140f7
cat $1 | egrep '(b[pP]|t[sS]|d[tT])h'
Packit 8140f7
cat $1 | egrep '^(g[cC]|n[gG]|bh[fF])h'
Packit 8140f7
echo 'Checking for repeated letters...'
Packit 8140f7
cat $1 | egrep '([^lnr])\1' | egrep -v '^(sh?núú|lottó)'
Packit 8140f7
cat $1 | egrep '([lnr])\1\1'
Packit 8140f7
cat $1 | egrep '(aá|áa|eé|ée|ií|ií|oó|óo|uú|úu)'
Packit 8140f7
echo 'Checking for weird diphthongs...'
Packit 8140f7
cat $1 | egrep '([iouáíóú][eé]|aé)' | egrep -v '^(bhuel|hiéana|t?sh?ubpoena)'
Packit 8140f7
cat $1 | egrep '[aeoáéíó]u'
Packit 8140f7
cat $1 | egrep '[íoóú][aá]' | egrep -v '^(sh?eampú|m?bh?uíá|g?ch?ó[aá]|reoá|t?sh?aíá)' | egrep -v 'iúáil' | egrep -v '^n?Gh?úam$'
Packit 8140f7
cat $1 | egrep '[aáeéoó]ú' | egrep -v '^(m?bh?áú|g?ch?réú|n?dh?óú|n?gh?laeú|naoú|neamhbháú|t?sh?éú|t?sh?óú)'
Packit 8140f7
cat $1 | egrep '[aáéíú]ó' | egrep -v '^(m?bh?uíó|n?dh?laíó|mh?éóis|réó|m?Bh?éóitia|mh?íóipe$)'
Packit 8140f7
cat $1 | egrep '(eí|é[áío]|[áuú]o)'
Packit 8140f7
echo 'Checking for weird triphthongs...'
Packit 8140f7
cat $1 | egrep '[aeiouáéíóú][aeiouáéóú][aeouáéíóú]' | egrep -v '(uaí|iúá)' | egrep -v "^(([bdm]'|h|[nt]-)?aeó|n?gh?lae|hiéan|náia|naoú|b?ph?aranóia|reoá|s[pt]raeá)"
Packit 8140f7
cat $1 | egrep '(eó|éa|io|iu|ío|uó)i' | egrep -v "^(([bdm]'|h|[nt]-)?aeóin|n?gh?iuirl|sciuir)" | egrep -v 'uóige'
Packit 8140f7
cat $1 | egrep '[aouáóú]íú' | egrep -v '^(buí|g?ch?roíú|dlaíó|saíá|spraíú)' | egrep -v 'gh?naíú'
Packit 8140f7
Packit 8140f7
## Initial position
Packit 8140f7
echo 'Checking for funny starting combinations...'
Packit 8140f7
cat $1 | egrep '^[bcdfghlmnprt]h?[bcdfgmnpst]' | egrep -v '^(b(p|hf)|[cgt]h?n|gc|mb|n[dg]|ts|dt)' | egrep -v '^mh?ná$'
Packit 8140f7
# this one includes "no initial ll,nn,rr"!
Packit 8140f7
cat $1 | egrep '^(s[bdg]|[lmnr][lr]|nn|ps)'
Packit 8140f7
cat $1 | egrep '^e[^aiouáíóú]'
Packit 8140f7
Packit 8140f7
## Terminal position
Packit 8140f7
echo 'Checking for funny ending combinations...'
Packit 8140f7
cat $1 | egrep '[bcdfghmpst][bcdfglmnprs]$' | egrep -v '(sc|dh[a-z]|[ptc]s|ai?sp|iamb|mp|t.*ghd)$'
Packit 8140f7
cat $1 | egrep '[^bcdgmt]h$'
Packit 8140f7
cat $1 | egrep '[bcdeéfghm]t$' | egrep -v '(ch|ing|abh)t$' | egrep -v '(sh?ei[cf]|ch?raif)t$'
Packit 8140f7
cat $1 | egrep 'l[bdhinorsu]$' | egrep -v '(bh?oi?lb|gh?ild|scoi?lb)$'
Packit 8140f7
cat $1 | egrep 'n[dfhilmopru]$' | egrep -v '(ainm|sh?einm|sh?oicind|^Alaind)$'
Packit 8140f7
Packit 8140f7
## from Litriú na Gaeilge 
Packit 8140f7
echo 'Checking for pre-standard spellings (Litriú na Gaeilge rules)...'
Packit 8140f7
# Rule 2.a, lch 103
Packit 8140f7
cat $1 | egrep 'tch' | egrep -v '^(g?ch?(airtchlá|eartch|ruitchorda|ostchiorr)|leachtchriostai?l$|n?dh?(íotchúis|réachtchon)|smúitcheo|[sS]tátchist[eí]|d?th?(oitcheo|uairtchai?rr)|vástchóta)' | egrep -v 'fh?abhtcheartú$'
Packit 8140f7
# Rule 3.I.b, lch 104.  ÓD lch viii -aidhe -> -aí
Packit 8140f7
cat $1 | egrep 'dhe$' | egrep -v '(aghaidhe|réidhe)$' | egrep -v "^([bdm]'|h|[nt]-)?(fhlidhe|[ou]idhe|uídhe)" | egrep -v '^(luaidhe|(bh)?flidhe|m?bh?úidhe|g?Ch?oimdhe|d?th?eidhe|sh?oraidhe|spleidhe)$'
Packit 8140f7
# Rule 3.II.b, lch 105  (exceptions include some "lit." spellings)
Packit 8140f7
cat $1 | egrep 'adha.' | egrep -v "^([bdm]'|h|[nt]-)?adha" | egrep -v '(th?adhai?ll|radhai?rc|n?gh?adhai?r)' | egrep -v '^(m?bh?anadhaltra|n?gh?leadha|spadha)' | egrep -v "^(g?ch?adhai?[ln]|g?ch?eannadhairt|g?ch?ladha|m?bh?ladha|d?th?radhaill|mh?eadhar|ladhar|g?ch?eadharla)" | egrep -v "^([bdm]')?fhe?adha" | egrep -v "^(bh)?fe?adha"
Packit 8140f7
# Rule 3.II.c, lch 105
Packit 8140f7
cat $1 | egrep 'aedh(ea|i)'
Packit 8140f7
# Rule 3.II.e, lch 105
Packit 8140f7
cat $1 | egrep 'idhea' | egrep -v 'idheanna?$' | egrep -v '(infridhearg|fh?áidheadóireacht)a?$' | egrep -v '(uidheadha|fh?eidheartha)$' | egrep -v '^(g?ch?á|d?th?e)idheacha?$' | egrep -v '^heicsidheachúla'
Packit 8140f7
# Rule 4, lch 106
Packit 8140f7
cat $1 | egrep '[bm]hth' | egrep -v '^(réamh|leath|(bh?)fh?rith|neamh|b?ph?ríomh|g?ch?oi?mh|ríomh)th' | egrep -v 'ubhthorai?dh' | egrep -v '^(n?dh?o-chomhthomha|n?gh?eamhthro|d?th?aobhthro|n?dh?ubhthuirs|leamhthuirse$|rabhtha[rs]$)'
Packit 8140f7
# Rule 6.I.b, lch 106
Packit 8140f7
cat $1 | egrep 'ghe$' | egrep -v '^(n?dh?[aáó]|(bh)?fh?r?a|sh?eo|t?sh?o|d?th?ro|n?dh?eide|mh?a)ighe$' | egrep -v "^[bdm]'fhraighe" | egrep -v "^([bdm]'|h|[nt]-)?([aoó]|andó|éadó|ua)ighe"
Packit 8140f7
# Rule 6.I.c, lch 107, exceptions are literary
Packit 8140f7
cat $1 | egrep 'ugh' | egrep -v '^m?bh?rugh'
Packit 8140f7
# Rule 6.II.b, lch 107, exceptions are literary
Packit 8140f7
cat $1 | egrep '.ghail' | egrep -v 'fh?oghail$' | egrep -v 'iorghaile$' | egrep -v '^(n?dh?íoghail|d?th?oghail)$' | egrep -v '^mh?ionghailf$'
Packit 8140f7
# Rule 8.b, lch 108
Packit 8140f7
cat $1 | egrep 'tht'
Packit 8140f7
# Rule 14.a i and ii, lch 113
Packit 8140f7
cat $1 | egrep 'll[rs]' | egrep -v '([oO]lls|bhallra)' | egrep -v '^(n?dh?allr|m?ballra|n?dh?uillsilt|n?gh?éillsin|g?ch?allshaoth|g?ch?eallra|stiallscann)'
Packit 8140f7
# Rule 14.b.ii, sonnda is literary, lch 113
Packit 8140f7
cat $1 | egrep 'nnd' | egrep -v 'nndh?e[ai]rg' | egrep -v '^(lionndubh|g?ch?eanndán|sh?onnda$)' | egrep -v '^(b?ph?onnd)' | egrep -v '^d?th?eanndháileoi?g'
Packit 8140f7
# Rule 14.b.iv, loinnreach/mainnre are genitives, lch 113
Packit 8140f7
cat $1 | egrep 'nnr' | egrep -v '(nnrua|loinnreach)$' | egrep -v '^(g?ch?eannr|mh?ainnre|lannrollá)'
Packit 8140f7
# Rule 14.b.v, annsan is emphatic pronomial, not ==ansin, lch 113
Packit 8140f7
cat $1 | egrep 'nns' | egrep -v '^(g?ch?eanns|n?dh?innseanch|n?gh?rinnscr|b?ph?roinnseomra|g?ch?rannseil|mh?ionnscríbhinn|m?bh?onnsmid)' | egrep -v '^annsan$'
Packit 8140f7
# Rule 15.a, lch 114
Packit 8140f7
cat $1 | egrep 'ln' | egrep -v '(iailnimh|ilnáisiúnta|ollnóva|ulna|ilnithe$)'  | egrep -v '^(b?ph?ailn|m?bh?allnai?sc$)'
Packit 8140f7
# Rule 15.b, oirmhidne is literary genitive, lch 114
Packit 8140f7
cat $1 | egrep 'dn' | egrep -v '(eicidn[eí]$|ardnósa|oirmhidne$)' | egrep -v '^(m?bh?róidn|m?bh?airdne$|mh?aidneachai?n$)' | egrep -v '^muidne$'
Packit 8140f7
# Rule 16.a.i, lch 115
Packit 8140f7
cat $1 | egrep 'sg' | egrep -v 'aisgh(níomh|abh|air|afa$)|fh?olúsghlantó|(uas|íos)ghrád|aoisghrúpa'  | egrep -v '^(luasgh|b?ph?easghad|g?ch?leasghleac|g?ch?raosghalai?r$|g?ch?rosgho|n?dh?easghná|d?th?re?asgh|n?gh?lasgh|neasghao|rósghairdíní?$)'
Packit 8140f7
# Rule 16.a.iii, lch 115
Packit 8140f7
cat $1 | egrep 'sd' | egrep -v '(aisdúich|eisdírith|osduine$)' | egrep -v '^(g?ch?osdearg|d?th?easdí|d?th?rasdu|leasde|rósd|n?gh?lasdoi?nn)' | egrep -v 'osdaonna$'
Packit 8140f7
# Rule 19.g, lch 121, bladha, miadha, mudha, spleadha  literary
Packit 8140f7
cat $1 | egrep 'dha$' | egrep -v '(fhea|uidhea)dha$' | egrep -v '^((bh)?fea|m?bh?la|mh?(ia|u|o)|splea)dha$'
Packit 8140f7
# Rule 23.I.a, lch 123
Packit 8140f7
cat $1 | egrep 'árr'
Packit 8140f7
# Rule 23.I.b, lch 123
Packit 8140f7
cat $1 | egrep 'éir[dl]' | egrep -v '^(léirlé|spéirl)'
Packit 8140f7
# Rule 24, lch 124
Packit 8140f7
cat $1 | egrep "(-.*-|'.*')" | egrep -v '(earraí-le-roinnt$|éan-féin-é$)' | egrep -v '^[nt]-'
Packit 8140f7
cat $1 | egrep '-' | egrep -v "(-.*-|'.*')" | egrep -v '^([nt]-[aeiouáéíóú]|an-|n?dh?ea-|x-gha)' | egrep -v '([bcdfglmnprst]h?)-(\1|h)' | egrep -v '[aeiouáéíóú]-[aeiouáéíóú]' | egrep -v '[A-ZÁÉÍÓÚ].*-[A-ZÁÉÍÓÚ]' | egrep -v "(ion-anál|^(bh|[bdm]')?(fh?o-[abcéegirt]|fh?rith-chuaran)|^g?ch?omh-a|^n?dh?o-(chomh|gh|ranna|scartha)|t?sh?o-(bh|gha|ranna)|t?sh?(in-sean|íos-lucht)|^([bdm]'|h)?a[mn]-)" | egrep -v '(-ca$|^g?ch?(rua-chré$|oisí-clois|raobh-abh)|iar-tharraing|órang-úta|fh?ia-chai?t$|^n?dh?iosc-jaca|uisce-sciá|^d?th?(adhall-íogair|iuf-teaf)|^m?bh?an-ab|^b?ph?ríomh-(air|bhanaist|roghchlái?r$)|^n?gh?(áma-gha|ar-amha|earr-(aighn|chlóscrío?bh))|^(réalt|spás)-am(a|anna)?$|^hais-táblaí?$|^hurdaí-gurda|^nua-staire?$|^neamh-(a|chomh|shain|incháilithe|fhéinchúis)|^mh?ór-(ais|éil)|^t-léint?e$|^u-chasadh$|^V-mhuineál$|^m?bh?éite-thástá(il|la)$)' | egrep -v '(fh?leisc-ama?$|il-eitn|idir-ilchríocha|in-bhithmh|^n?dh?o-bhraite$|^mh?(eán-am|uir-eolai?s$))'
Packit 8140f7
# Rule 25, lch 127
Packit 8140f7
cat $1 | egrep "'" | egrep -v "^(m?b|[dm])'"
Packit 8140f7
Packit 8140f7
# Others of a similar nature
Packit 8140f7
# ÓD lch viii  -amhail -> -úil
Packit 8140f7
cat $1 | egrep 'amhail$' | egrep -v '(sh?|^)amhail$'
Packit 8140f7
# ÓD lch viii  -éaracht -> -éireacht
Packit 8140f7
cat $1 | egrep 'éaracht$' | egrep -v '^mh?éaracht$'
Packit 8140f7
# Ó Siadhail notes that 'ío' replaces 'ía' before a consonant
Packit 8140f7
cat $1 | egrep 'ía[bcdfglmnprst]'
Packit 8140f7
Packit 8140f7
### Assumptions from aspell phonetics file
Packit 8140f7
echo 'Checking for exceptions to assumptions made in aspell phonetics file...'
Packit 8140f7
echo '  (errors in this section may imply gaeilge_phonet.dat needs attention)'
Packit 8140f7
Packit 8140f7
echo 'A...'
Packit 8140f7
# ANBHANN
Packit 8140f7
cat $1 | egrep 'nbhann' | egrep -v 'anbhanna?$'
Packit 8140f7
Packit 8140f7
# ANBHAIN
Packit 8140f7
cat $1 | egrep 'anbhai' | egrep -v '(anbhainne?$|^m?bh?uanbhail|^n?gh?rianbhaic$)'
Packit 8140f7
Packit 8140f7
# AERGA
Packit 8140f7
cat $1 | egrep 'erga' | egrep -v 'aerga$'
Packit 8140f7
Packit 8140f7
# AORG
Packit 8140f7
cat $1 | egrep 'aorg[^h]' | egrep -v '^(mh?|t?sh?)aorg[aá]'
Packit 8140f7
Packit 8140f7
# AEILG
Packit 8140f7
cat $1 | egrep 'aeilg' | egrep -v 'Gh?aeilge'
Packit 8140f7
Packit 8140f7
# AILBH
Packit 8140f7
cat $1 | egrep 'ailbh' | egrep -v '[bcs]h?ailbh'
Packit 8140f7
Packit 8140f7
# ALBHÁI?D
Packit 8140f7
cat $1 | egrep 'albhái?d' | egrep -v '^(g?ch?oinnealbhái?d|n?gh?albhái?d$)'
Packit 8140f7
Packit 8140f7
# ALBH
Packit 8140f7
cat $1 | egrep 'albh[^aáeoóuúr]'
Packit 8140f7
Packit 8140f7
# ARBHÁI?D
Packit 8140f7
cat $1 | egrep 'arbhái?d' | egrep -v '^mh?ótarbhái?d$'
Packit 8140f7
Packit 8140f7
# ARBHUIL
Packit 8140f7
cat $1 | egrep 'arbhui[^t]' | egrep -v '(arbhuill|^mh?arbhuisc)[eí]$'
Packit 8140f7
Packit 8140f7
# ARBHUA
Packit 8140f7
cat $1 | egrep 'arbhua' | egrep -v 'eadarbhuasa'
Packit 8140f7
Packit 8140f7
# ARBHIN
Packit 8140f7
cat $1 | egrep 'arbhin' | egrep -v '^mh?arbhintinn'
Packit 8140f7
Packit 8140f7
# ARBH(EI), ARBH
Packit 8140f7
Packit 8140f7
# ATHFH(ÁÉÓAEIOU)---
Packit 8140f7
cat $1 | egrep 'thfh[íú]' | egrep -v '^d?th?áthfhéithl'
Packit 8140f7
Packit 8140f7
# ATH(BCD...), ADH
Packit 8140f7
Packit 8140f7
# AGHI---
Packit 8140f7
cat $1 | egrep 'aghi' | egrep -v '^g?ch?orraghiob'
Packit 8140f7
Packit 8140f7
# AGHLOIN
Packit 8140f7
cat $1 | egrep 'aghloi[^t]' | egrep -v '^b?ph?leicseaghloine$'
Packit 8140f7
Packit 8140f7
# AGH
Packit 8140f7
Packit 8140f7
# AOMH(FLNST)---  (first says no fh exception needed)
Packit 8140f7
cat $1 | egrep 'aomhfh' | egrep -v '^naomhfhá'
Packit 8140f7
cat $1 | egrep 'aomh[bcdgmpr]'
Packit 8140f7
Packit 8140f7
echo 'Á...'
Packit 8140f7
# ÁIRG-
Packit 8140f7
Packit 8140f7
# ÁDHU
Packit 8140f7
cat $1 | egrep 'ádhu' | egrep -v '^b?ph?ádhuill[eí]$'
Packit 8140f7
Packit 8140f7
# ÁDH
Packit 8140f7
cat $1 | egrep 'ádh[^u]' | egrep -v 'ádhú(il|la)$'
Packit 8140f7
Packit 8140f7
# ÁTHFH
Packit 8140f7
cat $1 | egrep 'áthfh[aeiouáéíóú]' | egrep -v '^(d?th?áthfhéithl|n?gh?náth)'
Packit 8140f7
Packit 8140f7
# ÁTH(BCD...)
Packit 8140f7
Packit 8140f7
echo 'B...'
Packit 8140f7
# BANBH, BHANBH, BAINBH, BHAINBH
Packit 8140f7
cat $1 | egrep 'bh?ai?nb' | egrep -v '^m?bh?ai?nbh(arúi?n)?$'
Packit 8140f7
Packit 8140f7
echo 'C...'
Packit 8140f7
# CHÉAFAÍ--$
Packit 8140f7
Packit 8140f7
# CH?EARCH--
Packit 8140f7
cat $1 | egrep 'ch?earch' | egrep -v '^g?ch?earchaill[eí]?$'
Packit 8140f7
Packit 8140f7
# CH?ONF
Packit 8140f7
cat $1 | egrep 'ch?onf' | egrep -v '^g?ch?onfa(cha?|i?dh|igh|í)$'
Packit 8140f7
Packit 8140f7
# CH?ANBH--
Packit 8140f7
cat $1 | egrep 'ch?anb' | egrep -v '^g?ch?anbhái?s'
Packit 8140f7
Packit 8140f7
# CH?OLBH
Packit 8140f7
cat $1 | egrep 'ch?olbh' | egrep -v '^g?ch?olbhaí?$'
Packit 8140f7
Packit 8140f7
# CH?URF
Packit 8140f7
cat $1 | egrep 'ch?urf' | egrep -v '^g?ch?urfá(nna)?$'
Packit 8140f7
Packit 8140f7
echo 'D...'
Packit 8140f7
# DH?ORCH
Packit 8140f7
Packit 8140f7
# DH?EARF
Packit 8140f7
cat $1 | egrep 'dh?earf' | egrep -v '^n?dh?earf[aáó]'
Packit 8140f7
Packit 8140f7
# DH?EIRF
Packit 8140f7
cat $1 | egrep 'dh?eirf' | egrep -v '^(n|leas)?dh?eirf(éar|iúr)'
Packit 8140f7
Packit 8140f7
# DH?OIL(BF)
Packit 8140f7
cat $1 | egrep 'dh?oil[bf]' | egrep -v '^n?dh?oil(fe|bh)'
Packit 8140f7
Packit 8140f7
# DH?IFEAR
Packit 8140f7
cat $1 | egrep 'dh?ife' | egrep -v '^n?dh?ifear$'
Packit 8140f7
Packit 8140f7
# DH$
Packit 8140f7
cat $1 | egrep '[^aeiouáéíóú]dh$'
Packit 8140f7
Packit 8140f7
# DH
Packit 8140f7
cat $1 | egrep 'edh' | egrep -v '(uiscedh|ch?inedh(eigh|íothú$))'
Packit 8140f7
cat $1 | egrep 'údh.'
Packit 8140f7
cat $1 | egrep '(^|[^aáiou])dh[^aeiouáéíóúlr]'
Packit 8140f7
Packit 8140f7
# DHLÚ-- and DHL(EIÍ)--
Packit 8140f7
cat $1 | egrep '[^aáiou]dhl' | egrep -v '(dhlú(th|ite)|dhlistean|dhleatha|^neamhdhlíthiú)'
Packit 8140f7
cat $1 | egrep '^dhl[^aeíiuú]'
Packit 8140f7
Packit 8140f7
# DHR rules
Packit 8140f7
cat $1 | egrep '[^aáiou]dhr[aáoóuú]' | egrep -v '((dh?obhar|uisce)dhro|^mh?arbhdhra|^(scig|n?gh?earr)dhrámaí?$|^t?sh?reangdhrumaí?$)'
Packit 8140f7
cat $1 | egrep '[^aáiou]dhr[eéií]' | egrep -v '(^n?dh?ídhreasacht|dhr[eé]acht|dhreacha?$|eirdhris)'
Packit 8140f7
cat $1 | egrep '^dhr[^aáeéiouú]' | egrep -v '^dhr(óla|íoda)'
Packit 8140f7
Packit 8140f7
echo 'E...'
Packit 8140f7
Packit 8140f7
# EAFAR
Packit 8140f7
cat $1 | egrep 'eafar$' | egrep -v '^(n?g|m)h?eafar$'
Packit 8140f7
Packit 8140f7
# EOFAR
Packit 8140f7
Packit 8140f7
# EILBH
Packit 8140f7
Packit 8140f7
# EIDH
Packit 8140f7
Packit 8140f7
# EOMH
Packit 8140f7
cat $1 | egrep 'eomh[bcdfglmnprst]' | egrep -v '^leomh[ft]'
Packit 8140f7
Packit 8140f7
echo 'É...'
Packit 8140f7
# ÉARBH
Packit 8140f7
cat $1 | egrep 'éarb' | egrep -v '^n?gh?éarbh'
Packit 8140f7
Packit 8140f7
# ÉARM
Packit 8140f7
cat $1 | egrep 'éarm[^h]' | egrep -v 'th?éarm(a|eol)'
Packit 8140f7
Packit 8140f7
# ÉARG
Packit 8140f7
cat $1 | egrep 'éarg[^h]' | egrep -v '^(lán)?léargai?s$'
Packit 8140f7
Packit 8140f7
# ÉIRG
Packit 8140f7
cat $1 | egrep 'éirg[^h]' | egrep -v 'ailléirg'
Packit 8140f7
Packit 8140f7
# ÉIRBH
Packit 8140f7
cat $1 | egrep 'éirbh' | egrep -v '^(léirbhreith|spéirbhe?an$)'
Packit 8140f7
Packit 8140f7
# ÉALBH
Packit 8140f7
cat $1 | egrep 'éalbh' | egrep -v '^m?bh?éalbh'
Packit 8140f7
Packit 8140f7
# ÉAFÁ
Packit 8140f7
cat $1 | egrep 'éafá' | egrep -v 'éafá$'
Packit 8140f7
Packit 8140f7
echo 'F...'
Packit 8140f7
# FH?AIRCH
Packit 8140f7
cat $1 | egrep 'fh?airc' | egrep -v 'fh?airch(e|í|íní?)$'
Packit 8140f7
Packit 8140f7
# FH?OIRF
Packit 8140f7
cat $1 | egrep 'foirf' | egrep -v '^(bh)?foirf'
Packit 8140f7
Packit 8140f7
# FH?ONNMH
Packit 8140f7
cat $1 | egrep 'fh?onnm' | egrep -v "^(b'|bh)?fh?onnmhai?r"
Packit 8140f7
Packit 8140f7
# FH?OILMH
Packit 8140f7
cat $1 | egrep 'fh?oilm' | egrep -v "^([bdm]'|bh)?fh?oilmh[eí]"
Packit 8140f7
Packit 8140f7
# FAIDH, almost always terminal
Packit 8140f7
cat $1 | egrep 'faidh[^b]' | egrep -v "fh?aidhpeái?l"
Packit 8140f7
Packit 8140f7
# FADH, almost always terminal
Packit 8140f7
cat $1 | egrep 'fadh[^bf]' | egrep -v 'fh?adharcái?n$'
Packit 8140f7
Packit 8140f7
# FIDH  (fidh only terminal)
Packit 8140f7
cat $1 | egrep 'fidh.'
Packit 8140f7
Packit 8140f7
# FEADH  almost always terminal
Packit 8140f7
cat $1 | egrep 'feadh[^n]' | egrep -v '^(bh)?feadha(in)?$'
Packit 8140f7
Packit 8140f7
# FEAR, FAR
Packit 8140f7
Packit 8140f7
# FINN  almost always terminal
Packit 8140f7
cat $1 | egrep 'finn[^eé]'
Packit 8140f7
Packit 8140f7
# FAINN  almost always terminal
Packit 8140f7
cat $1 | egrep 'fainn[^eéi]'
Packit 8140f7
Packit 8140f7
# FÁ
Packit 8140f7
Packit 8140f7
# FEÁ  almost always terminal
Packit 8140f7
cat $1 | egrep 'feá.' | egrep -v '^(bh)?feá(dói?r|nna$)'
Packit 8140f7
Packit 8140f7
# FA?Í
Packit 8140f7
Packit 8140f7
# FA?IMI(DS)
Packit 8140f7
cat $1 | egrep 'fa?imi[ds].'
Packit 8140f7
Packit 8140f7
# FA?IDÍS
Packit 8140f7
cat $1 | egrep 'fa?idís.'
Packit 8140f7
Packit 8140f7
echo 'G...'
Packit 8140f7
# GH?AINMH, GH?EALLMH
Packit 8140f7
cat $1 | egrep 'gh?(ain|eall)mh' | egrep -v '^n?gh?(ain|eall)mh'
Packit 8140f7
Packit 8140f7
# GH?LAFAI?DH
Packit 8140f7
Packit 8140f7
# GH
Packit 8140f7
cat $1 | egrep '[^aiou]gh[^aeiouáéíóúlnr]'
Packit 8140f7
cat $1 | egrep '[^aiou]ghl[ií]' | egrep -v '(^t?sh?árghliú|aimhghlic(ea|i)s)$'
Packit 8140f7
Packit 8140f7
echo 'I...'
Packit 8140f7
# IARG
Packit 8140f7
cat $1 | egrep 'iarg[^áhú]'
Packit 8140f7
Packit 8140f7
# IARBH
Packit 8140f7
Packit 8140f7
# IDIRBH
Packit 8140f7
Packit 8140f7
# IRBHRÚ
Packit 8140f7
cat $1 | egrep 'irbhrú' | egrep -v '^mh?uirbhrúchta?(nna)?$'
Packit 8140f7
Packit 8140f7
# IRBHU
Packit 8140f7
cat $1 | egrep 'irbhu' | egrep -v '(eochairbhuill[eí]$|^litirbhuamaí?$)'
Packit 8140f7
Packit 8140f7
# IFÍ$  (lots)
Packit 8140f7
Packit 8140f7
# INMHE(AÁ)
Packit 8140f7
cat $1 | egrep 'inmhe[^aá]'
Packit 8140f7
Packit 8140f7
# INNMH
Packit 8140f7
cat $1 | egrep 'innmh' | egrep -v '(fh?uinnmh|^g?ch?oinnmh)'
Packit 8140f7
Packit 8140f7
# IONMHAG, IONMH
Packit 8140f7
cat $1 | egrep 'ionmh' | egrep -v '^(g?ch?ionmhai?r|mh?ionmh)'
Packit 8140f7
Packit 8140f7
# ITHFH
Packit 8140f7
cat $1 | egrep 'ithfh' | egrep -v '(ch?ithfholc|ch?rithfhuacht|fh?rithfh|^sh?uaithfhriochadh$)'
Packit 8140f7
Packit 8140f7
# ITH(BCD...)
Packit 8140f7
Packit 8140f7
# IDH(BCD...)
Packit 8140f7
cat $1 | egrep 'idh[aouáéíóú]' | egrep -v 'idhí$'
Packit 8140f7
Packit 8140f7
# IGH(...)
Packit 8140f7
cat $1 | egrep 'igh[bgmpaouáéíóú]'
Packit 8140f7
Packit 8140f7
echo 'Í...'
Packit 8140f7
# ÍORM
Packit 8140f7
cat $1 | egrep 'íorm' | egrep -v '(^n?dh?íormaí?$|fh?íormh)'
Packit 8140f7
Packit 8140f7
# ÍOMH(BCD...)
Packit 8140f7
cat $1 | egrep 'íomh[bcdfglmnprst]' | egrep -v '^(b?ph?r|l|r|(n?g|s)h?n)íomh'
Packit 8140f7
Packit 8140f7
# ÍTHS-
Packit 8140f7
cat $1 | egrep 'íth[bcdfglmnpst]' | egrep -v '^g?ch?líths(í|eacha?)$'
Packit 8140f7
Packit 8140f7
echo 'J...'
Packit 8140f7
# J
Packit 8140f7
cat $1 | egrep '[jJ]' | egrep -v '^(j|n?dh?iosc-j)'
Packit 8140f7
Packit 8140f7
echo 'K...'
Packit 8140f7
# K
Packit 8140f7
cat $1 | egrep '[kK]' | egrep -v '^(karaté|Kiótó)$'
Packit 8140f7
Packit 8140f7
echo 'L...'
Packit 8140f7
# LEANBH/LINBH always terminal
Packit 8140f7
cat $1 | egrep 'l(ea|i)nbh.' | egrep -v '^leanbhaoise?$'
Packit 8140f7
Packit 8140f7
# L(BGM)H?
Packit 8140f7
Packit 8140f7
echo 'M...'
Packit 8140f7
# MORFAÍ--$  always terminal
Packit 8140f7
cat $1 | egrep 'morfaí.' 
Packit 8140f7
Packit 8140f7
# MBANBH, MBAINBH  see BANBH, etc. above
Packit 8140f7
Packit 8140f7
# MH?ARF
Packit 8140f7
cat $1 | egrep 'mharf[^aó]'
Packit 8140f7
Packit 8140f7
# MODH, MHODH
Packit 8140f7
Packit 8140f7
echo 'N...'
Packit 8140f7
# NAFAÍ--
Packit 8140f7
cat $1 | egrep 'nafaí' | egrep -v '^sh?nafaí$'
Packit 8140f7
Packit 8140f7
# NNARB
Packit 8140f7
cat $1 | egrep 'nnarb' | egrep -v 'ionnarb'
Packit 8140f7
Packit 8140f7
# NNEALBH--
Packit 8140f7
cat $1 | egrep 'nnealbh' | egrep -v '^g?ch?oinnealbhá'
Packit 8140f7
Packit 8140f7
# NDORCH, NDEARF, NDEIRF, NDOIL, NDIFEAR   see  D-
Packit 8140f7
# NGAINMH, NGEALLMH, NGLAF...  see G-
Packit 8140f7
Packit 8140f7
# NCHA(ÍS)/NCHAIS/NCHAITHE
Packit 8140f7
cat $1 | egrep 'ncha([ís]|is|ith)' | egrep -v '(ionchai?s|sh?eancha)'
Packit 8140f7
Packit 8140f7
# NCHAIR(D)
Packit 8140f7
cat $1 | egrep 'nchair' | egrep -v '(nchaird[ei]|(th?ea|th?io|grea)nchair)'
Packit 8140f7
Packit 8140f7
# N(BM)H?
Packit 8140f7
Packit 8140f7
echo 'O...'
Packit 8140f7
# OFAR--$
Packit 8140f7
cat $1 | egrep '[^ae]ofar' | egrep -v '^(n?gh?l?a|mh?í)ofara?$'
Packit 8140f7
Packit 8140f7
# OIRCH
Packit 8140f7
cat $1 | egrep 'oirch' | egrep -v '.?.?oirch'
Packit 8140f7
Packit 8140f7
# OCALBH
Packit 8140f7
cat $1 | egrep 'ocalb' | egrep -v 'fh?ocalbhá'
Packit 8140f7
Packit 8140f7
# ORBHÁ
Packit 8140f7
cat $1 | egrep 'orbhá' | egrep -v 'fh?orbhái?s$'
Packit 8140f7
Packit 8140f7
# ONNCHA
Packit 8140f7
cat $1 | egrep 'onncha' | egrep -v '(Dh?|fh?i)onncha'
Packit 8140f7
Packit 8140f7
# OMHARB
Packit 8140f7
cat $1 | egrep 'omharb' | egrep -v '^g?ch?omharba'
Packit 8140f7
Packit 8140f7
# OMH(BCD...)
Packit 8140f7
Packit 8140f7
# OTH(BCD...)
Packit 8140f7
cat $1 | egrep 'oth[ft]'
Packit 8140f7
Packit 8140f7
# ODHAO
Packit 8140f7
cat $1 | egrep 'odhao' | egrep -v 'fh?odhao(ine|nna)$'
Packit 8140f7
Packit 8140f7
# ODH(ACLNR)
Packit 8140f7
cat $1 | egrep 'odh[bcdfgmpst]' | egrep -v '^d?th?odhchaí'
Packit 8140f7
Packit 8140f7
# OGHRÚP
Packit 8140f7
cat $1 | egrep 'oghrúp'  | egrep -v 'fh?oghrúpa'
Packit 8140f7
Packit 8140f7
# OGHLUA
Packit 8140f7
cat $1 | egrep 'oghlua'  | egrep -v '(^(n?dh?|t?sh?)oghluaiste(achta?)?$|^d?th?oghluai?s)'
Packit 8140f7
Packit 8140f7
# OGHAF
Packit 8140f7
cat $1 | egrep 'oghaf' | egrep -v '^n?dh?oghafa'
Packit 8140f7
Packit 8140f7
# OGH(AÁBCD...)
Packit 8140f7
cat $1 | egrep 'oghá' | egrep -v '^d?th?oghái?n$'
Packit 8140f7
Packit 8140f7
echo 'Ó...'
Packit 8140f7
# ÓR[GM]
Packit 8140f7
cat $1 | egrep 'órg[^h]' | egrep -v '(órga$|^mh?órga|^mórgóir$)'
Packit 8140f7
cat $1 | egrep 'órm[^h]'  | egrep -v 'th?órma(ch|igh)$'
Packit 8140f7
Packit 8140f7
# ÓGH
Packit 8140f7
cat $1 | egrep 'ógh' | egrep -v "^([bdm]'|h|[nt]-)?ógh"
Packit 8140f7
Packit 8140f7
echo 'Q...'
Packit 8140f7
# Q
Packit 8140f7
cat $1 | egrep '[qQ]' | egrep -v '^qu(inín|arto)$'
Packit 8140f7
Packit 8140f7
echo 'R...'
Packit 8140f7
# RANFAÍ
Packit 8140f7
cat $1 | egrep 'ranfa' | egrep -v 'fh?rith-chuaranfaí?$'
Packit 8140f7
Packit 8140f7
# RAFAÍ, lots, not nec. terminal either
Packit 8140f7
Packit 8140f7
# RRBHA
Packit 8140f7
Packit 8140f7
# REALMH
Packit 8140f7
cat $1 | egrep 'realm' | egrep -v '^d?th?realmh'
Packit 8140f7
Packit 8140f7
# RÍFEAR
Packit 8140f7
cat $1 | egrep 'rífear' | egrep -v '^((h|n-)?ath)?rífear$'
Packit 8140f7
Packit 8140f7
# ROMH(FT)
Packit 8140f7
cat $1 | egrep 'romh[bcdfglmnprst]' | egrep -v '^b?ph?romh[ft]'
Packit 8140f7
Packit 8140f7
# RFEAN/RFIN
Packit 8140f7
cat $1 | egrep 'rf(ean|in$)' | egrep -v '(ionoirfin|^(m?bh?e|n?gh?a|t?sh?e|mh?e)irf(ea|i)n)$'
Packit 8140f7
Packit 8140f7
# R(BGM)H--
Packit 8140f7
Packit 8140f7
# RBO--
Packit 8140f7
cat $1 | egrep 'rbo' | egrep -v '^g?ch?osarbolg'
Packit 8140f7
Packit 8140f7
echo 'S...'
Packit 8140f7
# SH?ORCH
Packit 8140f7
cat $1 | egrep 'sh?orch' | egrep -v '^(sh?orch|tsorchaithe$)'
Packit 8140f7
Packit 8140f7
# SH?OILBH
Packit 8140f7
cat $1 | egrep 'sh?oilb' | egrep -v '^(sh?oilbhi?r|tsoilbhris$)'
Packit 8140f7
Packit 8140f7
echo 'T...'
Packit 8140f7
# TH?ALMH
Packit 8140f7
cat $1 | egrep 'th?alm' | egrep -v '^d?th?almh[aóú]'
Packit 8140f7
Packit 8140f7
# TH?INFEADH/FIDH
Packit 8140f7
cat $1 | egrep 'th?inf[ei]' | egrep -v '^d?th?inf(ea|i)dh$'
Packit 8140f7
Packit 8140f7
# TH?AFA
Packit 8140f7
cat $1 | egrep 'th?afa' | egrep -v '^d?th?afai?nn$'
Packit 8140f7
Packit 8140f7
# TSORCH-, TSOILBH  see S-
Packit 8140f7
Packit 8140f7
# TH$ rule
Packit 8140f7
cat $1 | egrep '[^aeiouáéíóú]th$'
Packit 8140f7
Packit 8140f7
# TH->H, following check for (and find no) potential exceptions (i.e.silent TH)
Packit 8140f7
cat $1 | egrep '[^a]eth' | egrep -v 'uilethac'
Packit 8140f7
cat $1 | egrep 'éth' | egrep -v '^(n?dh?éth|g?ch?réthul)'
Packit 8140f7
cat $1 | egrep 'óth[^aeiouáéíóú]'
Packit 8140f7
Packit 8140f7
echo 'U...'
Packit 8140f7
# UFA
Packit 8140f7
cat $1 | egrep 'ufa[ír]' | egrep -v '^(m?bh?rufara?|(g?ch?|r)ufaí)$'
Packit 8140f7
Packit 8140f7
# UAI?RG
Packit 8140f7
cat $1 | egrep 'uai?rg' | egrep -v '(fh?uarga(chta?)?$|^d?th?ua(irgn|rgai?n))'
Packit 8140f7
Packit 8140f7
# UARBH
Packit 8140f7
Packit 8140f7
# UALGA
Packit 8140f7
cat $1 | egrep 'ualg' | egrep -v '((^n)?dh?ualg|^m?bh?ualghl)ai?s$'
Packit 8140f7
Packit 8140f7
# ULLMH
Packit 8140f7
cat $1 | egrep 'ullm' | egrep -v 'ullmh[aóúu]'
Packit 8140f7
Packit 8140f7
# UMH
Packit 8140f7
Packit 8140f7
# UTH(BCDGMNPR)
Packit 8140f7
cat $1 | egrep 'uthf'
Packit 8140f7
cat $1 | egrep 'uth[^aeiouáéíóú]' | egrep -v '^(t?sh?ruth|n?gh?uthphoi?st$)'
Packit 8140f7
Packit 8140f7
# ULCH
Packit 8140f7
Packit 8140f7
# URCH(AÓ)
Packit 8140f7
Packit 8140f7
# UDH
Packit 8140f7
cat $1 | egrep 'udh' | egrep -v '^mh?udh[aft]?'
Packit 8140f7
Packit 8140f7
# UGH
Packit 8140f7
cat $1 | egrep 'ugh' | egrep -v '^m?bh?rugh'   # repeat of 6.I.c above
Packit 8140f7
Packit 8140f7
echo 'Ú...'
Packit 8140f7
# ÚIRG
Packit 8140f7
cat $1 | egrep 'úirg' | egrep -v '^liotúirg'
Packit 8140f7
Packit 8140f7
# ÚTH(BCDF...)- no 'fh' exception needed
Packit 8140f7
cat $1 | egrep 'úth([gmns]|fh)'
Packit 8140f7
Packit 8140f7
echo 'V...'
Packit 8140f7
# V  (see Litriú na Gaeilge, Rule 20, lch 121)
Packit 8140f7
cat $1 | egrep '[vV]' | egrep -v "^(.?|[bdm]')[A-ZÁÉÍÓÚ]" | egrep -v '(vót|vír|volt|nóva|vialait|vinil)' | egrep -v "^([bdm]'|h|[nt]-)?(aircí|inveirteab)" | egrep -v '^([vV]|sva|leiviata|ribeaflaivin|rótvaidhlé|raiviólaí$|svuít|g?ch?ileav|n?dh?ordveidh|mh?eindiléiv)'
Packit 8140f7
Packit 8140f7
echo 'W...'
Packit 8140f7
# W
Packit 8140f7
cat $1 | egrep '[wW]' | egrep -v '(^wigwam|Dh?arwin)'
Packit 8140f7
Packit 8140f7
echo 'X...'
Packit 8140f7
# X
Packit 8140f7
cat $1 | egrep '[xX]' | egrep -v '^(Mh?arx.|x([aeéií]|-gha))'
Packit 8140f7
Packit 8140f7
echo 'Y...'
Packit 8140f7
# Y
Packit 8140f7
cat $1 | egrep '[yY]' | egrep -v '^yóyó'
Packit 8140f7
Packit 8140f7
echo 'Z...'
Packit 8140f7
# Z
Packit 8140f7
cat $1 | egrep '[zZ]' | egrep -v '^(z|b?ph?uza)' | egrep -v "^([bdm]'|h|[nt]-?)?(ózó|Úizbeiceast)"
Packit 8140f7
Packit 8140f7
## Remainder were inspired by gaeilge_phonet.dat but either
Packit 8140f7
## correspond to defunct rules or exceptions have no logical implications
Packit 8140f7
echo 'Checking for exceptions to defunct rules in phonetics file...'
Packit 8140f7
cat $1 | egrep 'ealbhr' | egrep -v '^n?gh?ealbhruth'
Packit 8140f7
cat $1 | egrep '..*gc[^h]'
Packit 8140f7
cat $1 | egrep 'fph' | egrep -v '^n?gh?rafpháip'
Packit 8140f7
cat $1 | egrep 'cdh' | egrep -v '^(m?bh?reacdhorc|sh?priocdhát|t?sh?iocdhó)'
Packit 8140f7
cat $1 | egrep '..*bp' | egrep -v 'sh?ubpoena'
Packit 8140f7
cat $1 | egrep 'íomhb' | egrep -v '^b?ph?ríomhbhe?an$'
Packit 8140f7
cat $1 | egrep 'bhmh' | egrep -v '^d?th?aobhmhao'
Packit 8140f7
cat $1 | egrep 'cgh' | egrep -v '^(m?bh?rioscghlór|t?sh?earcghr)'
Packit 8140f7
cat $1 | egrep 'chdh' | egrep -v '^(n?dh?rochdh|g?ch?ríochdheigh|smeachdhún)'
Packit 8140f7
cat $1 | egrep '[áiuú]fh' | egrep -v '^m?bh?áfhuinneo'
Packit 8140f7
cat $1 | egrep 'éfh' | egrep -v '^n?dh?éfh'
Packit 8140f7
cat $1 | egrep 'ófh' | egrep -v '^g?ch?lófhoir'
Packit 8140f7
Packit 8140f7
### Optional Broad/Broad, Slender/Slender check... lots of exceptions.
Packit 8140f7
#echo 'Checking for broad/slender or slender/broad...'
Packit 8140f7
#cat $1 | egrep '[aáoóuú][bcdfghlmnprst]+[iíeé]' | more
Packit 8140f7
#cat $1 | egrep '[iíeé][bcdfghlmnprst]+[aáoóuú]' | more