home *** CD-ROM | disk | FTP | other *** search
Wrap
<HTML> <HEAD> <TITLE>Text::Metaphone - A modern soundex. Phonetic encoding of words.</TITLE> <LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css"> <LINK REV="made" HREF="mailto:"> </HEAD> <BODY> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%> <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc"> <STRONG><P CLASS=block> Text::Metaphone - A modern soundex. Phonetic encoding of words.</P></STRONG> </TD></TR> </TABLE> <A NAME="__index__"></A> <!-- INDEX BEGIN --> <UL> <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI> <LI><A HREF="#synopsis">SYNOPSIS</A></LI> <LI><A HREF="#description">DESCRIPTION</A></LI> <LI><A HREF="#functions">FUNCTIONS</A></LI> <LI><A HREF="#caveats">CAVEATS</A></LI> <LI><A HREF="#author">AUTHOR</A></LI> <LI><A HREF="#see also">SEE ALSO</A></LI> <UL> <LI><A HREF="#man pages">Man pages</A></LI> <LI><A HREF="#books, journals and magazines">Books, Journals and Magazines</A></LI> </UL> <LI><A HREF="#copyright, et al.">COPYRIGHT, et al.</A></LI> </UL> <!-- INDEX END --> <HR> <P> <H1><A NAME="name">NAME</A></H1> <P>Text::Metaphone - A modern soundex. Phonetic encoding of words.</P> <P> <HR> <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1> <UL> <LI>Linux</LI> <LI>Solaris</LI> <LI>Windows</LI> </UL> <HR> <H1><A NAME="synopsis">SYNOPSIS</A></H1> <PRE> use Text::Metaphone; $phoned_words = Metaphone('Schwern');</PRE> <P> <HR> <H1><A NAME="description">DESCRIPTION</A></H1> <P><A HREF="#item_Metaphone"><CODE>Metaphone()</CODE></A> is a function whereby a string/word is broken down into a rough approximation of its english phonetic pronunciation. Very similar in concept and purpose to soundex, but much more comprehensive in its approach.</P> <P> <HR> <H1><A NAME="functions">FUNCTIONS</A></H1> <DL> <DT><STRONG><A NAME="item_Metaphone"><STRONG>Metaphone</STRONG></A></STRONG><BR> <DD> <PRE> $phoned_word = Metaphone($word, $max_phone_len);</PRE> <P>Takes a word and encodes it according to the Metaphone algorithm. The algorithm only deals with alphabetical characters, all else is ignored.</P> <P>If $max_phone_len is provided, Metaphone will only encode up to that many characters for each word.</P> <P>'sh' is encoded as 'X', 'th' is encoded as '0'. This can be changed in the metaphone.h header file.</P> </DL> <P> <HR> <H1><A NAME="caveats">CAVEATS</A></H1> <DL> <DT><STRONG><A NAME="item_Metaphone_algorithm_changes">Metaphone algorithm changes</A></STRONG><BR> <DD> I have made a few minor changes to the traditional metaphone algorithm found in the books. The most significant one is that it will differenciate between SCH and SCHW making the former K (As in School) and the latter sh (as in Schwartz and Schwern). <P>My changes can be turned off by defining the USE_TRADITIONAL_METAPHONE flag in metaphone.h.</P> <P>Due to these changes, any users of Metaphone v1.00 or earlier which have stored metaphonetic encodings, they should recalculate those with the new verison.</P> <P></P></DL> <P> <HR> <H1><A NAME="author">AUTHOR</A></H1> <P>Michael G Schwern <<A HREF="mailto:schwern@pobox.com">schwern@pobox.com</A>></P> <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> <P> <H2><A NAME="man pages">Man pages</A></H2> <P><A HREF="../../../lib/Text/Soundex.html">the Text::Soundex manpage</A></P> <P> <H2><A NAME="books, journals and magazines">Books, Journals and Magazines</A></H2> <DL> <DT><STRONG><A NAME="item_Binstock%2C_Andrew_%26_Rex%2C_John%2E_%22Metaphone">Binstock, Andrew & Rex, John. ``Metaphone: A Modern Soundex.'' <EM>Practical Algorithms For Programmers.</EM> Reading, Mass: Addion-Wesley, 1995 pp160-169</A></STRONG><BR> <DD> Contains an explaination of the basic metaphone concept & algorithm and C code from which I learned of Metaphone and ported this module. <P></P> <DT><STRONG><A NAME="item_4">Parker, Gary. ``A Better Phonetic Search.'' <EM>C Gazette</EM>, Vol. 5, No. 4 (June/July), 1990.</A></STRONG><BR> <DD> This is the public-domain C version of metaphone from which Binstock & Rex based their own.. I haven't actually read it. <P></P> <DT><STRONG><A NAME="item_12">Philips, Lawrence. <EM>Computer Language</EM>, Vol. 7, No. 12 (December), 1990.</A></STRONG><BR> <DD> And here's the original Metaphone algorithm as presented in Pick BASIC. <P></P></DL> <P> <HR> <H1><A NAME="copyright, et al.">COPYRIGHT, et al.</A></H1> <P>Copyright (c) 1997-1999 Michael G Schwern. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.</P> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%> <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc"> <STRONG><P CLASS=block> Text::Metaphone - A modern soundex. Phonetic encoding of words.</P></STRONG> </TD></TR> </TABLE> </BODY> </HTML>