Movatterモバイル変換


[0]ホーム

URL:


 / 
Text-Metaphone-20160805
River stage one • 2 direct dependents • 3 total dependents
/Text::Metaphone

Take me over?

The maintainer of this distribution is looking for someone to take over! If you're interested then please contact them viaemail.

NAME

Text::Metaphone - A modern soundex. Phonetic encoding of words.

SYNOPSIS

use Text::Metaphone;# XWRNmy $phoned_word = Metaphone('Schwern');

DESCRIPTION

Metaphone() 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.

FUNCTIONS

Metaphone

$phoned_word = Metaphone($word, $max_phone_len);

Takes a word and encodes it according to the Metaphone algorithm. The algorithm only deals with alphabetical characters, all else is ignored.

If $max_phone_len is provided, Metaphone will only encode up to that many characters for each word.

'sh' is encoded as 'X', 'th' is encoded as '0'. This can be changed in the metaphone.h header file.

CAVEATS

Metaphone algorithm changes

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).

My changes can be turned off by defining the USE_TRADITIONAL_METAPHONE flag in metaphone.h.

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.

AUTHOR

Michael G Schwern <schwern@pobox.com>

SEE ALSO

Man pages

Text::Soundex - A simpler word hashing algorithmText::DoubleMetaphone - Improved metaphoneText::Phonetic - A collection of phonetic algorithms

Books, Journals and Magazines

Binstock, Andrew & Rex, John. "Metaphone: A Modern Soundex."Practical Algorithms For Programmers. Reading, Mass: Addion-Wesley, 1995 pp160-169

Contains an explanation of the basic metaphone concept & algorithm and C code from which I learned of Metaphone and ported this module.

Parker, Gary. "A Better Phonetic Search."C Gazette, Vol. 5, No. 4 (June/July), 1990.

This is the public-domain C version of metaphone from which Binstock & Rex based their own.. I haven't actually read it.

Philips, Lawrence.Computer Language, Vol. 7, No. 12 (December), 1990.

And here's the original Metaphone algorithm as presented in Pick BASIC.

COPYRIGHT and LICENSE

Copyright (c) 1997, 1999, 2007-2008 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.

Module Install Instructions

To install Text::Metaphone, copy and paste the appropriate command in to your terminal.

cpanm

cpanm Text::Metaphone

CPAN shell

perl -MCPAN -e shellinstall Text::Metaphone

For more information on module installation, please visitthe detailed CPAN module installation guide.

Keyboard Shortcuts

Global
sFocus search bar
?Bring up this help dialog
GitHub
gpGo to pull requests
gigo to github issues (only if github is preferred repository)
POD
gaGo to author
gcGo to changes
giGo to issues
gdGo to dist
grGo to repository/SCM
gsGo to source
gbGo to file browse
Search terms
module: (e.g.module:Plugin)
distribution: (e.g.distribution:Dancer auth)
author: (e.g.author:SONGMU Redis)
version: (e.g.version:1.00)

[8]ページ先頭

©2009-2025 Movatter.jp