1 \section{\module{soundex
} ---
3 \declaremodule{builtin
}{soundex
}
9 The soundex algorithm takes an English word, and returns an
10 easily-computed hash of it; this hash is intended to be the same for
11 words that sound alike. This module provides an interface to the
14 Note that the soundex algorithm is quite simple-minded, and isn't
15 perfect by any measure. Its main purpose is to help looking up names
16 in databases, when the name may be misspelled --- soundex hashes common
17 misspellings together.
19 \begin{funcdesc
}{get_soundex
}{string
}
20 Return the soundex hash value for a word; it will always be a
21 6-character string.
\var{string
} must contain the word to be hashed,
22 with no leading whitespace; the case of the word is ignored. (Note
23 that the original algorithm produces a
4-character result.)
26 \begin{funcdesc
}{sound_similar
}{string1, string2
}
27 Compare the word in
\var{string1
} with the word in
\var{string2
}; this
29 \code{get_soundex(
\var{string1
})
} \code{==
}
30 \code{get_soundex(
\var{string2
})
}.
36 \seetext{Donald E. Knuth,
\emph{Sorting and Searching,
} vol.
3 in
37 ``The Art of Computer Programming.'' Addison-Wesley Publishing
38 Company: Reading, MA:
1973. pp.\
391-
392. Discusses the origin and
39 usefulness of the algorithm, as well as the algorithm itself. Knuth
40 gives his sources as
\emph{U.S. Patents
1261167} (
1918) and
41 \emph{1435663} (
1922), attributing the algorithm to Margaret K. Odell
42 and Robert C. Russel. Additional references are provided.
}