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