26 Mar 2004 16:47:20 UTC
- Distribution: Text-DoubleMetaphone
- Module version: 0.07
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (2)
- Testers (2230 / 1 / 0)
- KwaliteeBus factor: 0
- 42.11% Coverage
- License: unknown
- Activity24 month
- Download (9.93KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
Text::DoubleMetaphone - Phonetic encoding of words.
use Text::DoubleMetaphone qw( double_metaphone ); my($code1, $code2) = double_metaphone("Aubrey");
This module implements a "sounds like" algorithm developed by Lawrence Philips which he published in the June, 2000 issue of C/C++ Users Journal. Double Metaphone is an improved version of Philips' original Metaphone algorithm.
In contrast to the Soundex and Metaphone algorithms, Double Metaphone will sometimes return two encodings for words that can be plausibly pronounced multiple ways.
For additional details, see Philips' discussion of the algorithm at:
- double_metaphone( STRING )
Takes a word and returns a phonetic encoding. In an array context, it returns one or two phonetic encodings for the word. In a scalar context, it returns the first encoding. The first encoding is usually based on the most commonly heard U.S. pronounciation of the word.
Copyright 2000, Maurice Aubrey <firstname.lastname@example.org>. All rights reserved.
This code is based heavily on the C++ implementation by Lawrence Philips, and incorporates several bug fixes courtesy of Kevin Atkinson <email@example.com>.
This module is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
Philips, Lawrence. C/C++ Users Journal, June, 2000.
Philips, Lawrence. Computer Language, Vol. 7, No. 12 (December), 1990.
Kevin Atkinson (author of the Aspell spell checker) maintains a page dedicated to the Metaphone and Double Metaphone algorithms at <http://aspell.sourceforge.net/metaphone/>
Module Install Instructions
To install Text::DoubleMetaphone, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Text::DoubleMetaphone
For more information on module installation, please visit the detailed CPAN module installation guide.