mirror of
https://github.com/python/cpython
synced 2024-09-15 23:46:26 +00:00
Added soundex (sigh)
This commit is contained in:
parent
c0967cd4a2
commit
3486f27428
|
@ -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)
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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}
|
||||
|
|
25
Doc/lib/libsoundex.tex
Normal file
25
Doc/lib/libsoundex.tex
Normal file
|
@ -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}
|
25
Doc/libsoundex.tex
Normal file
25
Doc/libsoundex.tex
Normal file
|
@ -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}
|
Loading…
Reference in a new issue