|
4694
|
1 \section{Standard Module \sectcode{soundex}}
|
|
|
2 \stmodindex{soundex}
|
|
|
3
|
|
|
4 \renewcommand{\indexsubitem}{(in module soundex)}
|
|
|
5 The soundex algorithm takes an English word, and returns an
|
|
|
6 easily-computed hash of it; this hash is intended to be the same for
|
|
|
7 words that sound alike. This module provides an interface to the
|
|
|
8 soundex algorithm.
|
|
|
9
|
|
|
10 Note that the soundex algorithm is quite simple-minded, and isn't
|
|
|
11 perfect by any measure. Its main purpose is to help looking up names
|
|
|
12 in databases, when the name may be misspelled -- soundex hashes common
|
|
|
13 misspellings together.
|
|
|
14
|
|
|
15 \begin{funcdesc}{get_soundex}{string}
|
|
|
16 Return the soundex hash value for a word; it will always be a
|
|
|
17 6-character string. \var{string} must contain the word to be hashed,
|
|
|
18 with no leading whitespace; the case of the word is ignored.
|
|
|
19 \end{funcdesc}
|
|
|
20
|
|
|
21 \begin{funcdesc}{sound_similar}{string1, string2}
|
|
|
22 Compare the word in \var{string1} with the word in \var{string2}; this
|
|
|
23 is equivalent to
|
|
|
24 \code{get_soundex(\var{string1})==get_soundex(\var{string2})}.
|
|
|
25 \end{funcdesc}
|