module Text::Metaphone::Rules
Defined in:
text/metaphone.crConstant Summary
-
BUGGY =
STANDARD.dup
-
The rules for the 'buggy' alternate implementation used by PHP etc.
-
STANDARD =
[[/([bcdfhjklmnpqrstvwxyz])\1+/, "\\1"], [/^ae/, "E"], [/^[gkp]n/, "N"], [/^wr/, "R"], [/^x/, "S"], [/^wh/, "W"], [/mb$/, "M"], [/(?!^)sch/, "SK"], [/th/, "0"], [/t?ch|sh/, "X"], [/c(?=ia)/, "X"], [/[st](?=i[ao])/, "X"], [/s?c(?=[iey])/, "S"], [/(ck?|q)/, "K"], [/dg(?=[iey])/, "J"], [/d/, "T"], [/g(?=h[^aeiou])/, ""], [/gn(ed)?/, "N"], [/([^g]|^)g(?=[iey])/, "\\1J"], [/g+/, "K"], [/ph/, "F"], [/([aeiou])h(?=\b|[^aeiou])/, "\\1"], [/[wy](?![aeiou])/, ""], [/z/, "S"], [/v/, "F"], [/(?!^)[aeiou]+/, ""]]
-
Metaphone rules. These are simply applied in order.