.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Metaphone 3pm" .TH Metaphone 3pm "2020-11-09" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Text::Metaphone \- A modern soundex. Phonetic encoding of words. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Text::Metaphone; \& \& # XWRN \& my $phoned_word = Metaphone(\*(AqSchwern\*(Aq); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`Metaphone()\*(C'\fR 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. .SH "FUNCTIONS" .IX Header "FUNCTIONS" \fIMetaphone\fR .IX Subsection "Metaphone" .PP .Vb 1 \& $phoned_word = Metaphone($word, $max_phone_len); .Ve .PP Takes a word and encodes it according to the Metaphone algorithm. The algorithm only deals with alphabetical characters, all else is ignored. .PP If \f(CW$max_phone_len\fR is provided, Metaphone will only encode up to that many characters for each word. .PP \&'sh' is encoded as 'X', 'th' is encoded as '0'. This can be changed in the metaphone.h header file. .SH "CAVEATS" .IX Header "CAVEATS" \fIMetaphone algorithm changes\fR .IX Subsection "Metaphone algorithm changes" .PP 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 \&\s-1SCH\s0 and \s-1SCHW\s0 making the former K (As in School) and the latter sh (as in Schwartz and Schwern). .PP My changes can be turned off by defining the \s-1USE_TRADITIONAL_METAPHONE\s0 flag in metaphone.h. .PP Due to these changes, any users of Metaphone v1.00 or earlier which have stored metaphonetic encodings, they should recalculate those with the new version. .SH "AUTHOR" .IX Header "AUTHOR" Michael G Schwern .SH "SEE ALSO" .IX Header "SEE ALSO" .SS "Man pages" .IX Subsection "Man pages" Text::Soundex \- A simpler word hashing algorithm Text::DoubleMetaphone \- Improved metaphone Text::Phonetic \- A collection of phonetic algorithms .SS "Books, Journals and Magazines" .IX Subsection "Books, Journals and Magazines" \fIBinstock, Andrew & Rex, John. \*(L"Metaphone: A Modern Soundex.\*(R" \fIPractical Algorithms For Programmers.\fI Reading, Mass: Addion-Wesley, 1995 pp160\-169\fR .IX Subsection "Binstock, Andrew & Rex, John. Metaphone: A Modern Soundex. Practical Algorithms For Programmers. Reading, Mass: Addion-Wesley, 1995 pp160-169" .PP Contains an explanation of the basic metaphone concept & algorithm and C code from which I learned of Metaphone and ported this module. .PP \fIParker, Gary. \*(L"A Better Phonetic Search.\*(R" \fIC Gazette\fI, Vol. 5, No. 4 (June/July), 1990.\fR .IX Subsection "Parker, Gary. A Better Phonetic Search. C Gazette, Vol. 5, No. 4 (June/July), 1990." .PP This is the public-domain C version of metaphone from which Binstock & Rex based their own.. I haven't actually read it. .PP \fIPhilips, Lawrence. \fIComputer Language\fI, Vol. 7, No. 12 (December), 1990.\fR .IX Subsection "Philips, Lawrence. Computer Language, Vol. 7, No. 12 (December), 1990." .PP And here's the original Metaphone algorithm as presented in Pick \s-1BASIC.\s0 .SH "COPYRIGHT and LICENSE" .IX Header "COPYRIGHT and LICENSE" Copyright (c) 1997, 1999, 2007\-2008 Michael G Schwern. All Rights Reserved. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.