Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3486f27

Browse files
committed
Added soundex (sigh)
1 parent c0967cd commit 3486f27

5 files changed

Lines changed: 53 additions & 1 deletion

File tree

Doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ LIBFILES = lib.tex \
112112
libcd.tex libfl.tex libfm.tex libgl.tex libimgfile.tex libsun.tex \
113113
libxdrlib.tex libimghdr.tex \
114114
librestricted.tex librexec.tex libbastion.tex \
115-
libformatter.tex liboperator.tex
115+
libformatter.tex liboperator.tex libsoundex.tex
116116

117117
# Library document
118118
lib.dvi: $(LIBFILES)

Doc/lib.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
\input{libregex}
9494
\input{libregsub}
9595
\input{libstruct}
96+
\input{libsoundex}
9697

9798
\input{libmisc} % Miscellaneous Services
9899
\input{libmath}

Doc/lib/lib.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
\input{libregex}
9494
\input{libregsub}
9595
\input{libstruct}
96+
\input{libsoundex}
9697

9798
\input{libmisc} % Miscellaneous Services
9899
\input{libmath}

Doc/lib/libsoundex.tex

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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}

Doc/libsoundex.tex

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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}

0 commit comments

Comments
 (0)