f// translation rules for Irish Gaeilge
// This file is UTF-8 encoded
// written by Ronan McGuirk  2013
// Version 2.8.3
// Please send comments and suggestions to espeak.gaeilge@gmail.com


// Conditional rules
// ?1  allow eclipsis as 2 separate words

.L01 e i é í // slender vowels
.L02 c ch d g gh n  s // following ea gets ; sounds
.L03 b bh mb  c ch f m mh dh p ph   // used for words likemuir or cuid
.L04 b bh mb    // for words like beag
.L05 nn nna nnas dh r s ntas nach nas nais dar mar rtha nta mh chas chais cht  chta nnach ntach llach d l  ll             // word endings where @ is to repleace ea or a
.L06 aidh idh aí á eá eadh adh ad ead  adsa eadsa  imid aimid imis aimis  ainn ainnse inn innse idís aidís éin      // word endings where f changes to h
.L07 b c g ch bh gh mb
.L08 lc ll nt bhse       // for words like cailc
.L09 cl cr chr  f
.L10 c ch p ph gl ghl
.L11 c dh gh the s nn nne nt tiúil tiúla tíochta theoir theora    ste steach ll llí llín  g gí mse     // word endings preceded by ai
.L12 á é ó eo ua   // when followed by i
.L13 oc omb
.L14 río dún gnío        // followed with mh
.L15 c ch  f bhf fh   m d dh g gc  gh mh // aoi following
.L16 b c bh ch gr ghr t th    // for inn word ending
.L17 l le li niste nn
.L18 n nt nte neann neadh ntear nim nfear nfinn nfidh nfidis neamar
.L19 na nea ra rea la llea arga     // word endings with silent dh
.L20 eo eoir eá eabh io iu iú               // slender m
.L21 ll nn nna nnta ndán nntán nntáin
.L22  eadh eag eaga eagán eagáinín eo  io iu iú eall eabh ealtaine eann
.L23 ea eo i
.L24 b mb bh g gh p ph bp m mh
.replace
	ḃ	bh
	ċ	ch
ḋ	dh
ḟ	fh
ġ	gh
ṁ	mh
ṗ	ph
ṫ	th




	ċ	ch

.group a
        a          0#
        a (_       @
        adh (a     aI        // words like radharc
        adh (C     aI
        abht       aU#t[
        amhr       aUr       //	words like amhras
        amha       aU@
     K) amhl       aUl
        abh (C     aU        //	words like slabhra
        aghaidh    aIg
     t) abhair     u:@r
    th) abhair     u:@r
     t) abhar      u:@r
    th) abhar      u:@r
     _) an (sL01   @n
     _) a (nA      @
     _) an (_      @n
     _) an (-      '0n       // an prefix
     é) a          @         // words like féach
     X) a (nn_     aU#
     X) a (ll_     aU#
        abha       aU@
        abhai      aU@
        am (pla    aUm
        ama (_     aU#m@
        athair     'ah@r
     _) amh        aU
        agha       aI@
        agh (d     aI
        agh (s     aI
     _) ath        0h
        a (rraige  a
        ai (m_     @
        aí         'i:
        aí (_      %i:
        aoi        @i:
     _) aoi        i:
   ath) aoi (r     'i:@
     r) aoi (nín   'e:@
        aoicht (_  'i:@xt[
     d) aoine (_   @i:n;%i:
     C) ao (C      @e:@
  _L24) ao (C      w'e:@
     C) ao (th_    @e:
     b) ao (++     we:@
     b) ao (th_++  we:
        ao         @e
     _) ao         e:
        ae         e:
        amhna (_   aUn@
        arraing    arIng
     _) ath (@@P3  ,0_
     _) athr       '0hr
     _) ard (@P3   A:rd[

.group á
        á          A:
     @) á          ,A:
        ádh        A:
        áthair (_  A:h@r
        áthar      A:h@r
        ái (p      A:
        áinig      A:nIg
        ái         'A:i


.group ai
        ai         a#
   L04) ai (L17    0#
        aile (_    '0l;E     // words like baile
    Xc) ai (lA     '0#
    ch) ai (lA     '0#
     m) ai (n      0#
     c) ai (th     0#
    ch) ai (th     0#
        ai (lleach 0#
        ai (tín    0#
        ai (d      0#
     p) ai (l      0#
     @) ai (L11_   I
        ai (L08++  aI#
     c) ai (l_     I
        ai (msi    'aI       // words like aimsir
  _L04) ai (L18_++ u1'I//words like bain
     c) ai (t_     u1'I
     s) ai (bh     E
    sh) ai (bh     E
        aighre     aIr@
     X) aigh       'aI
        aigh       aI#
  _L04) aill (_    wi:l
        aing (_    Ing
        ailleach   '0l;@x
        ai (llimh++ '0       // words like Gaillimh
        aidhm      aIm


.group b
        b          b         // broad
   L01) b          b;        // slender
        b (L22     bj        //slender
        bh         v         // broad
        bh (_      vv
        bh (L22    vj        // slender
   L01) bh         v
?1 _m_) b (@ 
     _) bhf        v         // urú broad
     _) bhf (L22   v;        // urú slender
     _) bp         b         // urú broad
     _) bp (L01    b;        // urú slender
?1   _) bh (_f     v         // urú broad
?1   _) bh (_fL22  v;        // urú slender
?1   _) b (_p      b         // urú broad
?1   _) b (_pL01   b;        // urú slender
     a) bh (a      U         // for example cabhair
   ear) bha        u:        // words like Cearbhall
        bhfaigh    v'aI
     _) beann (@   ba#n
     _) bheann (@  va#n
     _) bun (C@P3  b,Un
?1 _m_) bun (C@P3  ,Un
     _) bpríomh (@P7 bR,i:v


.group c
        c          k
        c (L01     k;        // slender
        ch         x
        ch (L01    C;
        ch (é+     C;
        ch (ei+    x;
?1 _g_) c (@ 
?1 _g_) c (L01 
     _) cabhr      k'aUr
     _) chabhr     x'aUr
     _) ceann (C@P5 k;,aUn
     _) cheann (C@P6 C;,aUn
     _) comh (@@P4 k,o:
     _) chomh (@@P5 x,o:
        comhar     k'o:@r
        chomhar    x'o:@r
        comhair    k'o:@r
        chomhair   x'o:@r

.group d
        d          d[        // broad
   L01) d          dZ        // slender
        d (L22     dZ        // slender
        d (L01     d;        // slender
        d (CL01    dZ
     i) d (i       dZ
?1 _n_) d (@ 
        dh         Q         // broad
        dh (ui     Q         // broad
        dh (ao     Q         // broad
        dh (L01    j         // slender
     _) dt         d[        // broad urú
     _) dt (L01    dZ        // slender urú
?1   _) d (_t      d[
?1   _) d (_tL01   dZ
     _) d' (@P2    d

     _) d'         d
     _) d (_'fh    d

        d'fh (L01  d

        dhaoine    Q@i:n;%i:
     i) dh (_      g
     a) dh (_      X
     o) dh (_      X
   L19) dh (_                // silent dh at wrd end
    Va) dh (_+ 
        deartháir  dr@h'A:r
        dheartháir gr@h'A:r
        deirfiúr   d;r@f'u:r
        dheirfiúr  g;r@f'u:r
        domhan     d[aU@n
     _) do (Ch@@P2 d[,U_
     _) dí (C@@P2  d,i:
        dícheall   d;'i:Ca#l

.group e
        e          E#
        eá         A:
        ei         E
        eidh (C    aI
     r) ei (m      aI
        eighea     aI
        eighea     aI
     s) ei (nn     aI
    sh) ei (nn     aI
        eigh       aI

        eo         o:
        eoi        o:
        eoi (CC_   o:I
        eoi (g     o:I
        eogha      o:
        eoghai     o:
     d) eo (ch     O#
    dh) eo (ch     O#
     _) eo (ch     O#
    _h) eo (ch     O#
     s) eo (_      @



.group é
        é          'e:
        éi         'e:
        éa         'e:
     _) éi (rig    aI        // words like éirigh
    _h) éi (rí     aI
     _) éi (rí     aI        // words like éirí
     _) éireoidh   aIro:Ig
        éacs       e:@ks


.group ea
        ea         a#
        eai        a#
     X) ea (L21_   aU
        ea (ltaine aU
     g) ea (ll     aU
     l) eamh (n    aU
   Kdr) ea (m      aU
     X) ea (ch     0
  _L04) ea (g      @
  _L04) ea (dh_    @
  _L04) eagn       @gn
   L04) eaga (_    @g@
        eaghl      aIl
        eabhra     aUr@      //	words like Feabhra
        eabhs      aUs
        eanbhean   'an@v,an
        eadhb      aIb


.group f
        f          f         // broad
        f (L22     f;        // slender
        fh                   // silent
        fh (éin_   h
        fh (L22    ;         // slender
     @) f (L06_    h
        fios       fIs
        faoi       fw'i:
        fhios      Is
     _) fo (C@@P2  f,U
     _) fogh       f'aU
     _) forb       f'Orb
     _) foc (@++   fOk
?1 _bh_) f (@ 
?1 _bh_) f (L22     ;
     _) fíor (@P4  f,i:r


.group g
        g          g         // broad
        g (L01     g;        // slender
?1 _n_) g (@ 
        gh         Q"
     _) gh (L01    Q"j
     _) gc         g         // urú broad
     _) gc (L01    g;        // urú slender
?1   _) g (_c      g         // urú broad
?1   _) g (_cL01   g;        // urú slender
     i) gh (_      g
    @C) gh (@      X
     _) gn         g@n
        gh (n      X@
        gheobh     j'o:
        gabh       gaU
        ghabh      Q"aU
     _) gearr (C@@P5 g;,aR
     _) ghearr (C@@P6 Q"j,aR
     _) gnáth (@@P5 g@n,A:
     _) ghnáth (@P6 X@n,A:

.group h
        h          h         // silent


.group i
        i          I
     _) i          I
        ia         i@
        iu         U
        ia (tha    i:
        io         O#
        iond       O#n@d[
        ioml       O#m@l
        io (dá     I
     _) io (nadh   u://      words like ionadh
     s) io (mb     I
    sh) io (mb     I

   _pr) io (n      u:
   L16) inn (_     i:n
        iai        i:i
        impeall    i:mp@l
        io (s      I         //words like fios and liosta
   L12) i          i         // non syllabic short i after long vowel
        iú         u:
     m) i (d_      i:        // verb ending
     _) in (@@P2   ,In_
     _) inn        In
     _) in (tinn   'In
     _) ionad (C@@P5 ,Ona#d[

.group í
        í          'i:
        íomh       'i:v
        íochn      'i:xn
        í (_       i:
        ín (_      i:n
        ío         i:@
        íle (_     'i:lE


.group l
        l          l         // broad
   L01) l          l;        // slender
        l (L23     l;        //slender
        ll         l
        ll (L23    l;
        l (g       l@
        l (b       l@
   L01) l (b       l;@
        ll (b      l
     _) lorg (@@P4 l,Or@g
     _) lán (@@P3  l,A:n

.group m
        m          m         // broad
        m (L20     m;        //slender
        mh         v
        mh (L20    v;        // slender
     _) mb         m         // urú
     _) mb (L22    m;        // urú slender
?1   _) m (_b      m         // urú
?1   _) m (_bL22   m;        // urú slender
     _) m (n       m@//      words like mná
   L14) mh         v
     _) mh (n      v@
  léir) mheas      vas
     r) m          @m        // words like gorm
     r) m (L20     @m;
     _) mear (@@P4 m,ar
     _) mí (C@@P2  m,i:

.group n
        n          n         // broad
        n (L01     n;        // slender
?1   _) n (_L01    n;
     _) nd         n         // urú
     _) nd (L01    n;        // urú slender
        ng         N
        ng (L01    N;
?1   _) n (_d      n         // urú
?1   _) n (_dL01   n;        // urú slender
?1   _) n (_g      N
?1   _) n (_gL01   N;
        nn         n
        nn (L01    nj        // slender
     i) nn (_      N
        n (b       n@
        n (m       n@
        n (bh      n@
        n (ch      n@
     c) n          @n
    ch) n          @n
     _) nasc (C@@  n,0sk

.group o
        o          O#
     _) o          'O
     C) o (cht_    'O
        orn (_     'Or@n

    _C) omh        o:
   _CC) omh        o:
        omha       o:@

        omhai      o:@
        o (ll_     aU
     C) o (nn_     aU
     r) o (nn_     O#
     C) ogh        aU

        omhain (_  aUIn
        odha       aU
        opaic      @pIk
     C) odh (_     o:
        odl (a     O#l
        oí         i:
        o (rd_     o:
        o (ird_    o:
     _) oll (@@P3  ,Ol

.group ó
        ó          'o:
        ómhai      o:@

        ói (p@     'o:

.group oi
        oi         O
  _L15) oi (+      @'I
     _) oi (b      I
        oi (de     I
        oi (di     I
        oi (c_     I
     h) oi (b      I
     _) oi (r      I
     r) oi         I
     l) oi (n      I
     f) oi (lC     aI
     l) oi (g      I
    fh) oi (lC     aI
     s) oi (ls     aI#
     c) oi (c      aI#
        oi (nnío   @
        oi (mis    @
        ois (++    O#S
     n) ois (_++   IS
        oill (+    w'i:l
     _) oi (leá    'I
        oidh       aI
        oir (_     'ERR
     l) oic (_     Ek
   _sc) oi (r      O
        oigh (ea   aI
        oighn      aIXn
        oinse (_   @i:nS@
        oi (nte    @i:

.group p
        p          p         // broad
        ph         f         // broad
        p (L22     p;        // slender
        ph (L20    f;        // slender
?1 _b_) p (@ 
     _) príomh (@P6 pR,i:v
     _) phríomh (@P7 fR,i:v



.group r
        r          r         // broad
   L01) r          R         // slender
        r (L01     R
  L12i) r (e_      Z
  L12i) r (t_      Z
        rr         R
        rg         r@g
        rgh        rQ"
   L01) rg         R@g       // slender
        r (bh      r@
     s) r (A       R
     _) ramh       raU
     _) réamh (@P5 r,e:v


.group s
        s          s         // broad
   L01) s          S         // slender
        s (L01     S         // slender
        s (CL01    S
        s (CCL01   S         // slender
        s (pCé     s         // broad
?1 _t_) s (@ 
        sh         h
        sh (CL01   h
        sh (L01    h;
        s (lL01    S
    _') s (_       s         // 's in poems etc
     _) sain (@P4  s,an
     _) sean (@@P4 S,an


.group t
        t          t[        // broad
   L01) t          c         // slender
        t (í++n    tS        // slender
        t (eo++    tS
        t (L01     c         // slender
?1   _) t (_L01    c
  L01C) t          tS        // slender after consonant
        t (CL01    tS        // slender with following consonant before vowels
?1 _d_) t (@ 
        th         h
        th (L01    h;
  L01C) th         h
     _) ts         t[        // eclipsis broad
     _) ts (L01    t;        // eclipsis slender
?1   _) t (_s      t[        // eclipsis broad
?1   _) t (_sL01   t;        // eclipsis slender
   L01) th         h
        taine (_   t[In%E
    ao) th (_ 
        thne (_    h@nE
     A) th (_                // silent th at word end
     c) th (e_     ih        // guta cúnta
     K) th (as_    @h        // guta cúnta


.group u
        u          U#
        ua         u@
        ua (_      u:@
        uai        u@
        uai (g     ui
        uai (d     ui
        uainn      u:iN
        uá         u:'A:
        ui         I

        uinn (_    'i:n
        uinti      U#'i:ntI
    _b) uí         wi:
   _bh) uí         wi:
     g) uí         wi:
    gh) uí         wi:
        umh        u:
   L03) ui         @I
    _d) u (l_      O#
     g) ui (gh_    @i:
    gh) ui (gh_    @i:
        uí         i:
        uíomh      'i:@vv

        uachai     'ux@
     _) uimhir (C@P6 ,IvIR
        uibhne (_  @'i:n;E
        uibhneach (_ @'i:n@x


.group ú
        ú          u:
        únmh       u:nv

        úi         u:
        úinn (_    u:IN
        úibh (_    u:Iv
        úi (g      u:i



// words which contain j k q v w x y z, speak as English
.group j
        j          _^_EN

.group k
        k          _^_EN

.group q
        q          _^_EN

.group v
        v          _^_EN
        véarsa     ve:rs@

.group w
        w          _^_EN

.group x
        x          _^_EN

.group y
        y          _^_EN

.group z
        z          _^_EN




