BMDM Soundex

This is a fork of Beider-Morse and Daitch-Mokotoff soundex algorithms. Merged and reforged in object-oriented way for more convenient usage and development.

Description

This is a fork of the algorithm developed by Alexander Beider and Stephen P. Morse for phonetic matching of names and words. This algorithm generates less quantity of false hits comparing to soundex() and methaphone(). Also it's possible to use this algorithm for some non-latin alphabets without a transliteration.

Language support

Currently there are 16 languages supported: Czech, Dutch, English, French, German, Greek (and Greek Latin), Hebrew, Hungarian, Italian, Latvian, Polish, Portuguese, Romanian, Russian (latin and cyrillic), Spanish, Turkish. Also BMPM (Beider-Morse Phonetic Matching) and BMDM as it's derivative can parse Hebrew names by Ashkenazic and Sephardic rules.

What's the difference from original?

This fork's goal is to get rid of deprecated and global functions, global variables and to represent algorithm in object-oriented way. Also there were implemented some fixes and modifications for unification purposes. While exceeding the limits of procedural code now it's possible to include algorithm in frameworks and third-parity applications without a headache. Latvian language experimental support added.

Performance

I strictly encourage to use PHP 7.0 and newer due to major performance enhancement since 5.x versions especially in array processing which is crucial for BMDM. Take a look at benchmark results.

Requirements and usage

Library requires PHP 5.4 and higher with mbstring extension. I recommend installing it via composer and use it via composer autoloader. Usage examples with description are provided in this document.

Miscellaneous

Currently arabic language support is removed from stable branch due to severe performance issues related to excessively complicated phonetics. Available in separate branch. Your contribution is welcome :)