diff options
author | Guido van Rossum <guido@python.org> | 1996-12-12 17:02:21 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-12-12 17:02:21 (GMT) |
commit | 3486f27428e07a37713e2a44b4cc83038300cdbf (patch) | |
tree | 87884c65e486e221727147e78bccdb348f875239 | |
parent | c0967cd4a2e51054c12c8c8208bb4431e57d6fb3 (diff) | |
download | cpython-3486f27428e07a37713e2a44b4cc83038300cdbf.zip cpython-3486f27428e07a37713e2a44b4cc83038300cdbf.tar.gz cpython-3486f27428e07a37713e2a44b4cc83038300cdbf.tar.bz2 |
Added soundex (sigh)
-rw-r--r-- | Doc/Makefile | 2 | ||||
-rw-r--r-- | Doc/lib.tex | 1 | ||||
-rw-r--r-- | Doc/lib/lib.tex | 1 | ||||
-rw-r--r-- | Doc/lib/libsoundex.tex | 25 | ||||
-rw-r--r-- | Doc/libsoundex.tex | 25 |
5 files changed, 53 insertions, 1 deletions
diff --git a/Doc/Makefile b/Doc/Makefile index f0c9284..12851f0 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -112,7 +112,7 @@ LIBFILES = lib.tex \ libcd.tex libfl.tex libfm.tex libgl.tex libimgfile.tex libsun.tex \ libxdrlib.tex libimghdr.tex \ librestricted.tex librexec.tex libbastion.tex \ - libformatter.tex liboperator.tex + libformatter.tex liboperator.tex libsoundex.tex # Library document lib.dvi: $(LIBFILES) diff --git a/Doc/lib.tex b/Doc/lib.tex index 6eac257..c6d203d 100644 --- a/Doc/lib.tex +++ b/Doc/lib.tex @@ -93,6 +93,7 @@ to Python and how to embed it in other applications. \input{libregex} \input{libregsub} \input{libstruct} +\input{libsoundex} \input{libmisc} % Miscellaneous Services \input{libmath} diff --git a/Doc/lib/lib.tex b/Doc/lib/lib.tex index 6eac257..c6d203d 100644 --- a/Doc/lib/lib.tex +++ b/Doc/lib/lib.tex @@ -93,6 +93,7 @@ to Python and how to embed it in other applications. \input{libregex} \input{libregsub} \input{libstruct} +\input{libsoundex} \input{libmisc} % Miscellaneous Services \input{libmath} diff --git a/Doc/lib/libsoundex.tex b/Doc/lib/libsoundex.tex new file mode 100644 index 0000000..4c15c55 --- /dev/null +++ b/Doc/lib/libsoundex.tex @@ -0,0 +1,25 @@ +\section{Standard Module \sectcode{soundex}} +\stmodindex{soundex} + +\renewcommand{\indexsubitem}{(in module soundex)} +The soundex algorithm takes an English word, and returns an +easily-computed hash of it; this hash is intended to be the same for +words that sound alike. This module provides an interface to the +soundex algorithm. + +Note that the soundex algorithm is quite simple-minded, and isn't +perfect by any measure. Its main purpose is to help looking up names +in databases, when the name may be misspelled -- soundex hashes common +misspellings together. + +\begin{funcdesc}{get_soundex}{string} +Return the soundex hash value for a word; it will always be a +6-character string. \var{string} must contain the word to be hashed, +with no leading whitespace; the case of the word is ignored. +\end{funcdesc} + +\begin{funcdesc}{sound_similar}{string1, string2} +Compare the word in \var{string1} with the word in \var{string2}; this +is equivalent to +\code{get_soundex(\var{string1})==get_soundex(\var{string2})}. +\end{funcdesc} diff --git a/Doc/libsoundex.tex b/Doc/libsoundex.tex new file mode 100644 index 0000000..4c15c55 --- /dev/null +++ b/Doc/libsoundex.tex @@ -0,0 +1,25 @@ +\section{Standard Module \sectcode{soundex}} +\stmodindex{soundex} + +\renewcommand{\indexsubitem}{(in module soundex)} +The soundex algorithm takes an English word, and returns an +easily-computed hash of it; this hash is intended to be the same for +words that sound alike. This module provides an interface to the +soundex algorithm. + +Note that the soundex algorithm is quite simple-minded, and isn't +perfect by any measure. Its main purpose is to help looking up names +in databases, when the name may be misspelled -- soundex hashes common +misspellings together. + +\begin{funcdesc}{get_soundex}{string} +Return the soundex hash value for a word; it will always be a +6-character string. \var{string} must contain the word to be hashed, +with no leading whitespace; the case of the word is ignored. +\end{funcdesc} + +\begin{funcdesc}{sound_similar}{string1, string2} +Compare the word in \var{string1} with the word in \var{string2}; this +is equivalent to +\code{get_soundex(\var{string1})==get_soundex(\var{string2})}. +\end{funcdesc} |