]> granicus.if.org Git - python/commitdiff
Added soundex (sigh)
authorGuido van Rossum <guido@python.org>
Thu, 12 Dec 1996 17:02:21 +0000 (17:02 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 12 Dec 1996 17:02:21 +0000 (17:02 +0000)
Doc/Makefile
Doc/lib.tex
Doc/lib/lib.tex
Doc/lib/libsoundex.tex [new file with mode: 0644]
Doc/libsoundex.tex [new file with mode: 0644]

index f0c9284ca19ad313b84b6624982f5e56b927d965..12851f077a0df2038ac4b9fbf7c94d771188577f 100644 (file)
@@ -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)
index 6eac257aa529cd85abafe7ed3c2a672f083165f6..c6d203d599809402012535a2456ecebdb045c7aa 100644 (file)
@@ -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}
index 6eac257aa529cd85abafe7ed3c2a672f083165f6..c6d203d599809402012535a2456ecebdb045c7aa 100644 (file)
@@ -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 (file)
index 0000000..4c15c55
--- /dev/null
@@ -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 (file)
index 0000000..4c15c55
--- /dev/null
@@ -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}