extensions/spellcheck/hunspell/tests/unit/data/phone.aff

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 # phonetic suggestions by PHONE and optional ph field of dictionary words
     2 # Documentationo of PHONE: http://aspell.net/man-html/Phonetic-Code.html
     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
    53 PHONE 105
    54 PHONE AH(AEIOUY)-^         *H
    55 PHONE AR(AEIOUY)-^         *R
    56 PHONE A(HR)^               *
    57 PHONE A^                   *
    58 PHONE AH(AEIOUY)-          H
    59 PHONE AR(AEIOUY)-          R
    60 PHONE A(HR)                _
    61 PHONE BB-                  _
    62 PHONE B                    B
    63 PHONE CQ-                  _
    64 PHONE CIA                  X
    65 PHONE CH                   X
    66 PHONE C(EIY)-              S
    67 PHONE CK                   K
    68 PHONE COUGH^               KF
    69 PHONE CC<                  C
    70 PHONE C                    K
    71 PHONE DG(EIY)              K
    72 PHONE DD-                  _
    73 PHONE D                    T
    74 PHONE É<                   E
    75 PHONE EH(AEIOUY)-^         *H
    76 PHONE ER(AEIOUY)-^         *R
    77 PHONE E(HR)^               *
    78 PHONE ENOUGH^$             *NF
    79 PHONE E^                   *
    80 PHONE EH(AEIOUY)-          H
    81 PHONE ER(AEIOUY)-          R
    82 PHONE E(HR)                _
    83 PHONE FF-                  _
    84 PHONE F                    F
    85 PHONE GN^                  N
    86 PHONE GN$                  N
    87 PHONE GNS$                 NS
    88 PHONE GNED$                N
    89 PHONE GH(AEIOUY)-          K
    90 PHONE GH                   _
    91 PHONE GG9                  K
    92 PHONE G                    K
    93 PHONE H                    H
    94 PHONE IH(AEIOUY)-^         *H
    95 PHONE IR(AEIOUY)-^         *R
    96 PHONE I(HR)^               *
    97 PHONE I^                   *
    98 PHONE ING6                 N
    99 PHONE IH(AEIOUY)-          H
   100 PHONE IR(AEIOUY)-          R
   101 PHONE I(HR)                _
   102 PHONE J                    K
   103 PHONE KN^                  N
   104 PHONE KK-                  _
   105 PHONE K                    K
   106 PHONE LAUGH^               LF
   107 PHONE LL-                  _
   108 PHONE L                    L
   109 PHONE MB$                  M
   110 PHONE MM                   M
   111 PHONE M                    M
   112 PHONE NN-                  _
   113 PHONE N                    N
   114 PHONE OH(AEIOUY)-^         *H
   115 PHONE OR(AEIOUY)-^         *R
   116 PHONE O(HR)^               *
   117 PHONE O^                   *
   118 PHONE OH(AEIOUY)-          H
   119 PHONE OR(AEIOUY)-          R
   120 PHONE O(HR)                _
   121 PHONE PH                   F
   122 PHONE PN^                  N
   123 PHONE PP-                  _
   124 PHONE P                    P
   125 PHONE Q                    K
   126 PHONE RH^                  R
   127 PHONE ROUGH^               RF
   128 PHONE RR-                  _
   129 PHONE R                    R
   130 PHONE SCH(EOU)-            SK
   131 PHONE SC(IEY)-             S
   132 PHONE SH                   X
   133 PHONE SI(AO)-              X
   134 PHONE SS-                  _
   135 PHONE S                    S
   136 PHONE TI(AO)-              X
   137 PHONE TH                   @
   138 PHONE TCH--                _
   139 PHONE TOUGH^               TF
   140 PHONE TT-                  _
   141 PHONE T                    T
   142 PHONE UH(AEIOUY)-^         *H
   143 PHONE UR(AEIOUY)-^         *R
   144 PHONE U(HR)^               *
   145 PHONE U^                   *
   146 PHONE UH(AEIOUY)-          H
   147 PHONE UR(AEIOUY)-          R
   148 PHONE U(HR)                _
   149 PHONE V^                   W
   150 PHONE V                    F
   151 PHONE WR^                  R
   152 PHONE WH^                  W
   153 PHONE W(AEIOU)-            W
   154 PHONE X^                   S
   155 PHONE X                    KS
   156 PHONE Y(AEIOU)-            Y
   157 PHONE ZZ-                  _
   158 PHONE Z                    S
   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

mercurial