Double Metaphone

Double Metaphone

The Double Metaphone search algorithm is a phonetic algorithm written by Lawrence Philips and is the second generation of his Metaphone algorithm. Its implementation was described in the June 2000 issue of "C/C++ Users Journal".

It is called "Double" because it can return both a primary and a secondary code for a string; this accounts for some ambiguous cases as well as for multiple variants of surnames with common ancestry. For example, encoding the name "Smith" yields a primary code of "SM0" and a secondary code of "XMT", while the name "Schmidt" yields a primary code of "XMT" and a secondary code of "SMT"--both have "XMT" in common.

Double Metaphone tries to account for myriad irregularities in English of Slavic, Germanic, Celtic, Greek, French, Italian, Spanish, Chinese, and other origin. Thus it uses a much more complex ruleset for coding than its predecessor; for example, it tests for approximately 100 different contexts of the use of the letter C alone. In the introduction to his original journal article, Mr. Philips defended this complexity:

Albert Einstein once said, "Everything should be made as simple as possible--but no simpler!" Simplicity, of course, is a fundamental touchstone of quality in engineering and science. If an algorithm accomplishes its task as simply as possible, and demonstrates a touch of intuitive inspiration as well, we compliment it as "elegant." Unfortunately for engineers, human activity can rarely be described elegantly. And although text processing is a critical technology at a time when millions of people are searching the web, the unsystematic and exception-laden English language often demands algorithms that look ugly to engineers.

Implementations of Double Metaphone

* C++ implementation : http://www.cuj.com/documents/s=8038/cuj0006philips/
* C# implementation: http://www.codeproject.com/KB/recipes/dmetaphone5.aspx
* PHP implementation: http://swoodbridge.com/DoubleMetaPhone/
* PHP implementation (native, in C): http://pecl.php.net/package/doublemetaphone
* Ruby implementation included in http://english.rubyforge.org
* Ruby implementation included in http://rubyforge.org/projects/text/
* Perl implementation: http://www.cpan.org/modules/by-authors/id/MAURICE/
* Java implementation: http://commons.apache.org/codec/userguide.html
* Transact SQL implementation: http://www.sqlmag.com/Articles/ArticleID/26094/pg/1/1.html (full-text access requires subscription)
* Python and MySQL implementations: http://atomboy.isa-geek.com/plone/Members/acoil/programing/double-metaphone/

ee also

* Metaphone
* Soundex

External links

* [http://www.cuj.com/documents/s=8038/cuj0006philips/ "The Double Metaphone Search Algorithm"] , "C/C++ Users Journal", June 2000 (full-text access requires registration)
* [ftp://ftp.cuj.com/sourcecode/cuj/2000/cujjun2000.zip Source code from the above issue] (73 kilobytes, ZIP), including the Double Metaphone source in C++
* Code project article on double metaphone: http://www.codeproject.com/string/dmetaphone1.asp


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Double Metaphone — Le Double Metaphone est un algorithme de recherche phonétique écrit par Lawrence Philips et est la deuxième génération de l algorithme Metaphone. Son implémentation a été décrite en juin 2000 dans le magazine C/C++ Users Journal. Il est appelé… …   Wikipédia en Français

  • Metaphone — Metaphone  это фонетический алгоритм для индексирования слов по их звучанию с учётом основных правил английского произношения. На выходе алгоритм даёт ключи переменной длины, в отличие от алгоритма Soundex, который генерирует ключи с… …   Википедия

  • Metaphone — es un algoritmo fonético, un algoritmo para indexar palabras por su sonido al ser pronunciadas en inglés. Metaphone fue desarrollado por Lawrence Philips como respuesta a las deficiencias del algoritmo Soundex. Es más exacto que Soundex porque… …   Wikipedia Español

  • Metaphone — ist ein phonetischer Algorithmus zur Indizierung von Wörtern und Phrasen nach ihrem Klang in der englischen Sprache. Metaphone wurde von Lawrence Philips als Antwort zu der sehr groben Unterscheidbarkeit des Soundex Algorithmus entwickelt. Er ist …   Deutsch Wikipedia

  • Metaphone — Lawrence Philips redirects here. For the football player, see Lawrence Phillips. Metaphone is a phonetic algorithm, an algorithm published in 1990 for indexing words by their English pronunciation. It fundamentally improves on the Soundex… …   Wikipedia

  • Metaphone — Le Metaphone est un algorithme phonétique, algorithme pour indexer les mots selon leur sonorité lorsque prononcé en anglais. Metaphone a été développé par Lawrence Philips comme une réponse aux déficiences de l algorithme Soundex. Il est plus… …   Wikipédia en Français

  • Soundex — is a phonetic algorithm for indexing names by sound, as pronounced in English. The goal is for names with the same pronunciation to be encoded to the same representation so that they can be matched despite minor differences in spelling. Soundex… …   Wikipedia

  • List of terms relating to algorithms and data structures — The [http://www.nist.gov/dads/ NIST Dictionary of Algorithms and Data Structures] is a reference work maintained by the U.S. National Institute of Standards and Technology. It defines a large number of terms relating to algorithms and data… …   Wikipedia

  • Список терминов, относящихся к алгоритмам и структурам данных —   Это служебный список статей, созданный для координации работ по развитию темы.   Данное предупреждение не устанавливается на информационные списки и глоссарии …   Википедия

  • Список терминов — Список терминов, относящихся к алгоритмам и структурам данных   Это сл …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”