home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / zkuste / Perl / ActivePerl-5.6.0.613.msi / 䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥 / _9933cbcb6ac5836e1f81d324f9587b08 < prev    next >
Text File  |  2000-03-23  |  5KB  |  135 lines

  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Text::Metaphone - A modern soundex.  Phonetic encoding of words.</TITLE>
  5. <LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
  6. <LINK REV="made" HREF="mailto:">
  7. </HEAD>
  8.  
  9. <BODY>
  10. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  11. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  12. <STRONG><P CLASS=block> Text::Metaphone - A modern soundex.  Phonetic encoding of words.</P></STRONG>
  13. </TD></TR>
  14. </TABLE>
  15.  
  16. <A NAME="__index__"></A>
  17. <!-- INDEX BEGIN -->
  18.  
  19. <UL>
  20.  
  21.     <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
  22.  
  23.     <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
  24.     <LI><A HREF="#description">DESCRIPTION</A></LI>
  25.     <LI><A HREF="#functions">FUNCTIONS</A></LI>
  26.     <LI><A HREF="#caveats">CAVEATS</A></LI>
  27.     <LI><A HREF="#author">AUTHOR</A></LI>
  28.     <LI><A HREF="#see also">SEE ALSO</A></LI>
  29.     <UL>
  30.  
  31.         <LI><A HREF="#man pages">Man pages</A></LI>
  32.         <LI><A HREF="#books, journals and magazines">Books, Journals and Magazines</A></LI>
  33.     </UL>
  34.  
  35.     <LI><A HREF="#copyright, et al.">COPYRIGHT, et al.</A></LI>
  36. </UL>
  37. <!-- INDEX END -->
  38.  
  39. <HR>
  40. <P>
  41. <H1><A NAME="name">NAME</A></H1>
  42. <P>Text::Metaphone - A modern soundex.  Phonetic encoding of words.</P>
  43. <P>
  44. <HR>
  45. <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
  46. <UL>
  47. <LI>Linux</LI>
  48. <LI>Solaris</LI>
  49. <LI>Windows</LI>
  50. </UL>
  51. <HR>
  52. <H1><A NAME="synopsis">SYNOPSIS</A></H1>
  53. <PRE>
  54.   use Text::Metaphone;
  55.   $phoned_words = Metaphone('Schwern');</PRE>
  56. <P>
  57. <HR>
  58. <H1><A NAME="description">DESCRIPTION</A></H1>
  59. <P><A HREF="#item_Metaphone"><CODE>Metaphone()</CODE></A> is a function whereby a string/word is broken down into
  60. a rough approximation of its english phonetic pronunciation.  Very
  61. similar in concept and purpose to soundex, but much more
  62. comprehensive in its approach.</P>
  63. <P>
  64. <HR>
  65. <H1><A NAME="functions">FUNCTIONS</A></H1>
  66. <DL>
  67. <DT><STRONG><A NAME="item_Metaphone"><STRONG>Metaphone</STRONG></A></STRONG><BR>
  68. <DD>
  69. <PRE>
  70.     $phoned_word = Metaphone($word, $max_phone_len);</PRE>
  71. <P>Takes a word and encodes it according to the Metaphone algorithm.
  72. The algorithm only deals with alphabetical characters, all else is ignored.</P>
  73. <P>If $max_phone_len is provided, Metaphone will only encode up to that many
  74. characters for each word.</P>
  75. <P>'sh' is encoded as 'X', 'th' is encoded as '0'.  This can be changed
  76. in the metaphone.h header file.</P>
  77. </DL>
  78. <P>
  79. <HR>
  80. <H1><A NAME="caveats">CAVEATS</A></H1>
  81. <DL>
  82. <DT><STRONG><A NAME="item_Metaphone_algorithm_changes">Metaphone algorithm changes</A></STRONG><BR>
  83. <DD>
  84. I have made a few minor changes to the traditional metaphone algorithm found
  85. in the books.  The most significant one is that it will differenciate between
  86. SCH and SCHW making the former K (As in School) and the latter sh (as in
  87. Schwartz and Schwern).
  88. <P>My changes can be turned off by defining the USE_TRADITIONAL_METAPHONE
  89. flag in metaphone.h.</P>
  90. <P>Due to these changes, any users of Metaphone v1.00 or earlier which have stored
  91. metaphonetic encodings, they should recalculate those with the new verison.</P>
  92. <P></P></DL>
  93. <P>
  94. <HR>
  95. <H1><A NAME="author">AUTHOR</A></H1>
  96. <P>Michael G Schwern <<A HREF="mailto:schwern@pobox.com">schwern@pobox.com</A>></P>
  97. <P>
  98. <HR>
  99. <H1><A NAME="see also">SEE ALSO</A></H1>
  100. <P>
  101. <H2><A NAME="man pages">Man pages</A></H2>
  102. <P><A HREF="../../../lib/Text/Soundex.html">the Text::Soundex manpage</A></P>
  103. <P>
  104. <H2><A NAME="books, journals and magazines">Books, Journals and Magazines</A></H2>
  105. <DL>
  106. <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>
  107. <DD>
  108. Contains an explaination of the basic metaphone concept & algorithm and C code
  109. from which I learned of Metaphone and ported this module.
  110. <P></P>
  111. <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>
  112. <DD>
  113. This is the public-domain C version of metaphone from which Binstock & Rex 
  114. based their own..  I haven't actually read it.
  115. <P></P>
  116. <DT><STRONG><A NAME="item_12">Philips, Lawrence. <EM>Computer Language</EM>, Vol. 7, No. 12 (December), 1990.</A></STRONG><BR>
  117. <DD>
  118. And here's the original Metaphone algorithm as presented in Pick BASIC.
  119. <P></P></DL>
  120. <P>
  121. <HR>
  122. <H1><A NAME="copyright, et al.">COPYRIGHT, et al.</A></H1>
  123. <P>Copyright (c) 1997-1999 Michael G Schwern.  All Rights Reserved.
  124. This program is free software; you can redistribute it and/or
  125. modify it under the same terms as Perl itself.</P>
  126. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  127. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  128. <STRONG><P CLASS=block> Text::Metaphone - A modern soundex.  Phonetic encoding of words.</P></STRONG>
  129. </TD></TR>
  130. </TABLE>
  131.  
  132. </BODY>
  133.  
  134. </HTML>
  135.