1# phonetic suggestions by PHONE and optional ph field of dictionary words
2# Documentationo of PHONE: http://aspell.net/man-html/Phonetic-Code.html
3
4#   phonetic_english.h - phonetic transformation rules for use with phonetic.c
5#   Copyright (C) 2000 Björn Jacke
6#
7#   This rule set is based on Lawrence Phillips original metaphone
8#   algorithm with modifications made by Michael Kuhn in his
9#   C implantation, more modifications by Björn Jacke when
10#   converting the algorithm to a rule set and minor
11#   touch ups by Kevin Atkinson
12#
13#   This library is free software; you can redistribute it and/or
14#   modify it under the terms of the GNU Lesser General Public
15#   License version 2.1 as published by the Free Software Foundation;
16#
17#   This library is distributed in the hope that it will be useful,
18#   but WITHOUT ANY WARRANTY; without even the implied warranty of
19#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20#   Lesser General Public License for more details.
21#
22#   You should have received a copy of the GNU Lesser General Public
23#   License along with this library; if not, write to the Free Software
24#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25#
26#   Björn Jacke may be reached by email at bjoern.jacke@gmx.de
27#
28#   Changelog:
29#
30#   2000-01-05  Björn Jacke <bjoern.jacke@gmx.de>
31#               - first version with translation rules derived from
32#                 metaphone.cc distributed with aspell 0.28.3
33#               - "TH" is now representated as "@" because "0" is a
34#                 meta character
35#               - removed TH(!vowel) --> T; always use TH --> # instead
36#               - dropped "^AE" -> "E" (redundant)
37#               - "ing" is transformed to "N", not "NK"
38#               - "SCH(EO)" transforms to "SK" now
39#               - added R --> SILENT if (after a vowel) and no (vowel or
40#                 "y" follows) like in "Marcy" or "abort"
41#               - H is SILENT in RH at beginning of words
42#               - H is SILENT if vowel leads and "Y" follows
43#               - some ".OUGH.."  --> ...F exceptions added
44#               - "^V" transforms to "W"
45#   2000-01-07  Kevin Atkinson <kevinatk@home.com>
46#               Converted from header to data file.
47#
48#   2007-08-23  László Németh <nemeth AT OOo>
49#               Add PHONE header and PHONE keywords
50#
51# version 1.1
52
53PHONE 105
54PHONE AH(AEIOUY)-^         *H
55PHONE AR(AEIOUY)-^         *R
56PHONE A(HR)^               *
57PHONE A^                   *
58PHONE AH(AEIOUY)-          H
59PHONE AR(AEIOUY)-          R
60PHONE A(HR)                _
61PHONE BB-                  _
62PHONE B                    B
63PHONE CQ-                  _
64PHONE CIA                  X
65PHONE CH                   X
66PHONE C(EIY)-              S
67PHONE CK                   K
68PHONE COUGH^               KF
69PHONE CC<                  C
70PHONE C                    K
71PHONE DG(EIY)              K
72PHONE DD-                  _
73PHONE D                    T
74PHONE �<                   E
75PHONE EH(AEIOUY)-^         *H
76PHONE ER(AEIOUY)-^         *R
77PHONE E(HR)^               *
78PHONE ENOUGH^$             *NF
79PHONE E^                   *
80PHONE EH(AEIOUY)-          H
81PHONE ER(AEIOUY)-          R
82PHONE E(HR)                _
83PHONE FF-                  _
84PHONE F                    F
85PHONE GN^                  N
86PHONE GN$                  N
87PHONE GNS$                 NS
88PHONE GNED$                N
89PHONE GH(AEIOUY)-          K
90PHONE GH                   _
91PHONE GG9                  K
92PHONE G                    K
93PHONE H                    H
94PHONE IH(AEIOUY)-^         *H
95PHONE IR(AEIOUY)-^         *R
96PHONE I(HR)^               *
97PHONE I^                   *
98PHONE ING6                 N
99PHONE IH(AEIOUY)-          H
100PHONE IR(AEIOUY)-          R
101PHONE I(HR)                _
102PHONE J                    K
103PHONE KN^                  N
104PHONE KK-                  _
105PHONE K                    K
106PHONE LAUGH^               LF
107PHONE LL-                  _
108PHONE L                    L
109PHONE MB$                  M
110PHONE MM                   M
111PHONE M                    M
112PHONE NN-                  _
113PHONE N                    N
114PHONE OH(AEIOUY)-^         *H
115PHONE OR(AEIOUY)-^         *R
116PHONE O(HR)^               *
117PHONE O^                   *
118PHONE OH(AEIOUY)-          H
119PHONE OR(AEIOUY)-          R
120PHONE O(HR)                _
121PHONE PH                   F
122PHONE PN^                  N
123PHONE PP-                  _
124PHONE P                    P
125PHONE Q                    K
126PHONE RH^                  R
127PHONE ROUGH^               RF
128PHONE RR-                  _
129PHONE R                    R
130PHONE SCH(EOU)-            SK
131PHONE SC(IEY)-             S
132PHONE SH                   X
133PHONE SI(AO)-              X
134PHONE SS-                  _
135PHONE S                    S
136PHONE TI(AO)-              X
137PHONE TH                   @
138PHONE TCH--                _
139PHONE TOUGH^               TF
140PHONE TT-                  _
141PHONE T                    T
142PHONE UH(AEIOUY)-^         *H
143PHONE UR(AEIOUY)-^         *R
144PHONE U(HR)^               *
145PHONE U^                   *
146PHONE UH(AEIOUY)-          H
147PHONE UR(AEIOUY)-          R
148PHONE U(HR)                _
149PHONE V^                   W
150PHONE V                    F
151PHONE WR^                  R
152PHONE WH^                  W
153PHONE W(AEIOU)-            W
154PHONE X^                   S
155PHONE X                    KS
156PHONE Y(AEIOU)-            Y
157PHONE ZZ-                  _
158PHONE Z                    S
159
160#The rules in a different view:
161#
162# Exceptions:
163#
164#  Beginning of word: "gn", "kn-", "pn-", "wr-"  ----> drop first letter
165#                     "Aebersold", "Gnagy", "Knuth", "Pniewski", "Wright"
166#
167#  Beginning of word: "x"                                ----> change to "s"
168#                                     as in "Deng Xiaopeng"
169#
170#  Beginning of word: "wh-"                              ----> change to "w"
171#                                     as in "Whalen"
172#  Beginning of word: leading vowels are transformed to "*"
173#
174#  "[crt]ough" and "enough" are handled separately because of "F" sound
175#
176#
177#  A --> A      at beginning
178#          _      otherwise
179#
180#  B --> B      unless at the end of word after "m", as in "dumb", "McComb"
181#
182#  C --> X      (sh) if "-cia-" or "-ch-"
183#          S      if "-ci-", "-ce-", or "-cy-"
184#                 SILENT if "-sci-", "-sce-", or "-scy-", or "-cq-"
185#          K      otherwise, including in "-sch-"
186#
187#  D --> K      if in "-dge-", "-dgy-", or "-dgi-"
188#          T      otherwise
189#
190#  E --> A      at beginnig
191#          _      SILENT otherwise
192#
193#  F --> F
194#
195#  G -->        SILENT if in "-gh-" and not at end or before a vowel
196#                            in "-gn" or "-gned" or "-gns"
197#                           in "-dge-" etc., as in above rule
198#          K      if before "i", or "e", or "y" if not double "gg"
199#
200#          K      otherwise (incl. "GG"!)
201#
202#  H -->        SILENT if after vowel and no vowel or "Y" follows
203#                        or after "-ch-", "-sh-", "-ph-", "-th-", "-gh-"
204#                        or after "rh-" at beginning
205#          H      otherwise
206#
207#  I --> A      at beginning
208#          _      SILENT otherwise
209#
210#  J --> K
211#
212#  K -->        SILENT if after "c"
213#          K      otherwise
214#
215#  L --> L
216#
217#  M --> M
218#
219#  N --> N
220#
221#  O --> A      at beginning
222#          _      SILENT otherwise
223#
224#  P --> F      if before "h"
225#          P      otherwise
226#
227#  Q --> K
228#
229#  R -->        SILENT if after vowel and no vowel or "Y" follows
230#          R      otherwise
231#
232#  S --> X      (sh) if before "h" or in "-sio-" or "-sia-"
233#          SK     if followed by "ch(eo)" (SCH(EO))
234#          S      otherwise
235#
236#  T --> X      (sh) if "-tia-" or "-tio-"
237#          0      (th) if before "h"
238#                 silent if in "-tch-"
239#          T      otherwise
240#
241#  U --> A      at beginning
242#          _      SILENT otherwise
243#
244#  V --> V      if first letter of word
245#          F      otherwise
246#
247#  W -->        SILENT if not followed by a vowel
248#          W      if followed by a vowel
249#
250#  X --> KS
251#
252#  Y -->        SILENT if not followed by a vowel
253#          Y      if followed by a vowel
254#
255#  Z --> S
256