soundex
Expand a query into phonetic equivalents.
Language specific - mainly for names.
E.g. chebyshev -> tchebycheff
Method
Retain first letter
Word transformation aeiouhwy -> 0 bfpv -> 1 cgjkqsxzz -> 2 dt -> 3 l -> 4 mn -> 5 r -> 6
Recursively collpase pair of consecutive identical digits into 1.
333 -> 33 -> 3
- Remove all zeros
- Pad resulting string with trailing zeros, return first 4.
Example
Herman
Herman -> perform 1.
H06505 -> perform 2.
H06505 -> perform 3.
H655 -> perform 4.
H65500 -> perform 5.
H655 -> perform 5.