Sunday, August 26, 2007

Lawrence Philips' Metaphone Algorithm

Lawrence Philips' Metaphone Algorithm



Lawrence Philips' Metaphone Algorithm

Lawrence Philips' Metaphone Algorithm is an algorithm which returns the rough approximation of how an English word sounds. The author can be contacted at LFP at dolby com

A mailing list has been set up for the general discussion of the Metaphone algorithm. An archive for the mailing list can be found here

News

May 22, 2001
A PHP Implementation of the Double Metaphone Algorithm is now available.

August 8, 2000
A C and Perl Implementation of the Double Metaphone Algorithm is now available.

May 28, 2000
Added links to several other implementations of the original Metaphone algorithm.

May 27, 2000
There was a slight error in dmetaph-diff.txt (the list of exactly what words Aspell with the new Double Metaphone got and the original Aspell did not and vice versa) as the "Bad Spellers Mode" list was the same as the "Fast Mode." This is now fixed.

Original

The original Metaphone algorithm appeared in the December 1990 issue of Computer Language.

Double

The double Metaphone algorithm is the new improved Metaphone algorithm.

The Metaphone Algorithm and Aspell

Even though, this site is hosted off of Aspell's site, it is not meant to be Aspell specific except for this section. Aspell is an Open Source Spell checker that does a superior job of coming up with suggestions. The magic behind my spell checker comes from merging Lawrence Philips excellent Metaphone algorithm and Ispell's near miss strategy which is inserting a space or hyphen, interchanging two adjacent letters, changing one letter, deleting a letter, or adding a letter. The current version of Aspell uses a modified version of the Metaphone algorithm in a tablized form.

To see if the Double Metaphone algorithm will lead to an improvement in suggestion strategy I substituted in it in place of the existing tablized code and was able to archive a 1% better score based on on some test data. However, for some words the new Metaphone algorithm lead to worse results. I plan on merging the new Double Metaphone algorithm into the exiting table, but will make sure that it always leads to better results by perhaps not adding some rules or adding a slight variation of the Double Metaphone rule.


kevina at users sourceforge net
This site is not officaly affiliated with Lawrence Philips in any way.