#
# phoneme-rules_en : English phonetic hash rules v1.0
#                    Christopher G. Jennings (cjennings@acm.org)
#

# C is important for names like McCloud; G is needed only for one specific rule
kept-doubles = CG

#
# -Vowels-
#
# Rules: - all vowels convert to 'A'
#        - vowels are only kept at start of word, otherwise they are silent
#
# Note: the rule ": => -" is implicit since silence is the default
#

$: => A

#
# -Silent initial letters-
#
# Rules: initial KN, GN, PN, AC or WR always skips first letter
#            (accomplished by using silence)
#

$KN*|$GN*|$PN*|$AC*|$WR* => -

#
# -Accented Consonants-
#
# Rules: these are converted to their nearest equivalent English
#        pronunciation.
#

Ç => S
Ñ => NY

#
# -B-
#
# Rules: B is normally B
#      -but- it is silent at the end of a word after an M ("dumb")
#

B    => B
M^B$ => -

#
# -C-
#
# Rules: C is normally K
#      -but- X (sh) if CIA or CH, except that SCH (other than SCHW [q.v.]) is K
#            S if CI, CE or CY
#
# Note that S^CH is longest (4) so it will override CH.
#

C => K
S^CH => K 2
CIA => X
CH => X 2
CI|CE|CY => S

#
# -D-
#
# Rules: D is normally T
#      -but- J if DGE, DGY, or DGI
#

D => T
DGE|DGY|DGI => J

#
# -F-
#

F => F

#
# -G-
#
# Rules: G is normally K
#      -but- it is silent if GH and not at end
#               or before a vowel in GN or GNED
#            it is J if GI or GE or GY and not a double G
#

G => K
GH => -
GH$ => K
GN:|GNED: => -
GI|GE|GY => J
GG|GGI|GGE|GGY => K 2

#
# -H-
#
# Rules: H is normally H
#      -but- it is silent after a vowel when no vowel follows
#

H => H
:^H => -
:^H: => H

#
# -J-
#

J => J

#
# -K-
#
# Rules: K is normally K
#      -but- it is silent after a C
#

K => K
C^K => -

#
# -L M N-
#

L => L
M => M
N => N

#
# -P-
#
# Rules: P is normally P
#      -but- PH is F (phosphorous)
#            in PB, the P is made silent (Campbell, raspberry)
#

P => P
PH => F
PB => B 2

#
# -Q-
#

Q => K

#
# -R-
#
# Rules: R is normally R
#      -but- silent at the end of a word in IER (French origin, e.g. courtier)
#            except in MEIER/MAIER
#

R => R
IE^R$ => -
MEIE^R$|MAIE^R$ => R

#
# -S-
#
# Rules: S is normally S
#      -but- it is X (sh) in SH, SIO, SIA, SCHW, or SUGAR-
#            it is silent in ISL and YSL (island, Carlysle)
#
# Note: SCHW will override the S^CH => K rule above
#       because the S will come earlier in the string
#       and that rule's offset skips the C
#

S => S
SH => X 2
SIO|SIA => X
$SUGAR => X
SCHW => X 3
I^SL|Y^SL => -

#
# -T-
#
# Rules: T is normally T
#      -but- it is D (th) in TH
#            it is X (sh) in TIA or TIO
#            it is silent in TCH
#

T => T
TH => D 2
TIA|TIO => X
TCH => -

#
# -V-
#

V => F

#
# -W-
#
# Rules: W is W before a vowel
#      -but- silent otherwise
#
# Note: the rule "W => -" is implicit since silence is the default
#

W: => W

#
# -X-
#
# Rules: X is normally KS
#      -but- it is S at the start of a word (xylophone)
#

X => KS
$X => S

#
# -Y-
#
# Rules: Y is Y before a vowel
#      -but- silent otherwise
#
# Note: the rule "Y => -" is implicit since silence is the default
#

Y: => Y

#
# -Z-
#

Z => S
