1 # phonetic_english.h - phonetic transformation rules for use with phonetic.c
2 # Copyright (C) 2000 Björn Jacke
4 # This rule set is based on Lawrence Phillips original metaphone
5 # algorithm with modifications made by Michael Kuhn in his
6 # C implantation, more modifications by Björn Jacke when
7 # converting the algorithm to a rule set and minor
8 # touch ups by Kevin Atkinson
10 # This library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Lesser General Public
12 # License version 2.1 as published by the Free Software Foundation;
14 # This library is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # Lesser General Public License for more details.
19 # You should have received a copy of the GNU Lesser General Public
20 # License along with this library; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 # Björn Jacke may be reached by email at bjoern.jacke@gmx.de
27 # 2000-01-05 Björn Jacke <bjoern.jacke@gmx.de>
28 # - first version with translation rules derived from
29 # metaphone.cc distributed with aspell 0.28.3
30 # - "TH" is now representated as "@" because "0" is a
32 # - removed TH(!vowel) --> T; always use TH --> # instead
33 # - dropped "^AE" -> "E" (redundant)
34 # - "ing" is transformed to "N", not "NK"
35 # - "SCH(EO)" transforms to "SK" now
36 # - added R --> SILENT if (after a vowel) and no (vowel or
37 # "y" follows) like in "Marcy" or "abort"
38 # - H is SILENT in RH at beginning of words
39 # - H is SILENT if vowel leads and "Y" follows
40 # - some ".OUGH.." --> ...F exceptions added
41 # - "^V" transforms to "W"
42 # 2000-01-07 Kevin Atkinson <kevinatk@home.com>
43 # Converted from header to data file.
154 #The rules in a different view:
158 # Beginning of word: "gn", "kn-", "pn-", "wr-" ----> drop first letter
159 # "Aebersold", "Gnagy", "Knuth", "Pniewski", "Wright"
161 # Beginning of word: "x" ----> change to "s"
162 # as in "Deng Xiaopeng"
164 # Beginning of word: "wh-" ----> change to "w"
166 # Beginning of word: leading vowels are transformed to "*"
168 # "[crt]ough" and "enough" are handled separately because of "F" sound
171 # A --> A at beginning
174 # B --> B unless at the end of word after "m", as in "dumb", "McComb"
176 # C --> X (sh) if "-cia-" or "-ch-"
177 # S if "-ci-", "-ce-", or "-cy-"
178 # SILENT if "-sci-", "-sce-", or "-scy-", or "-cq-"
179 # K otherwise, including in "-sch-"
181 # D --> K if in "-dge-", "-dgy-", or "-dgi-"
184 # E --> A at beginnig
189 # G --> SILENT if in "-gh-" and not at end or before a vowel
190 # in "-gn" or "-gned" or "-gns"
191 # in "-dge-" etc., as in above rule
192 # K if before "i", or "e", or "y" if not double "gg"
194 # K otherwise (incl. "GG"!)
196 # H --> SILENT if after vowel and no vowel or "Y" follows
197 # or after "-ch-", "-sh-", "-ph-", "-th-", "-gh-"
198 # or after "rh-" at beginning
201 # I --> A at beginning
206 # K --> SILENT if after "c"
215 # O --> A at beginning
218 # P --> F if before "h"
223 # R --> SILENT if after vowel and no vowel or "Y" follows
226 # S --> X (sh) if before "h" or in "-sio-" or "-sia-"
227 # SK if followed by "ch(eo)" (SCH(EO))
230 # T --> X (sh) if "-tia-" or "-tio-"
231 # 0 (th) if before "h"
232 # silent if in "-tch-"
235 # U --> A at beginning
238 # V --> V if first letter of word
241 # W --> SILENT if not followed by a vowel
242 # W if followed by a vowel
246 # Y --> SILENT if not followed by a vowel
247 # Y if followed by a vowel