Skip to content

Double Metaphone

Some time ago, I wrote a wrapper around the CPAN module Text-DoubleMetaphone by Maurice Aubrey for PHP. This allowed the use of the DoubleMetaphone algorithm with PHP. While the PHP core already has Metaphone, it lacks support for the second version, which handles latin languages a bit more correctly.

At the time, I did post an email to the PECL dev lists, but didn't receive any positive or negative answer. I thus never decided to publish it on PECL, thinking people weren't interested in the package - I was wrong. I have been contacted this week by email, asking if I could send the package to someone, if I still had the code. Well, lucky me, it had not the time to bitrot.

So here we go. If you need Double Metaphone inside PHP, grab doublemetaphone-0.1.0.tgz from here and follow the instructions on how to install PECL packages. You should be able to do something similar to this:

olivier@geeko-book $ pecl download
downloading doublemetaphone-0.1.0.tgz ...
Starting to download doublemetaphone-0.1.0.tgz (7,450 bytes)
.....done: 7,450 bytes

olivier@geeko-book $ sudo pecl install doublemetaphone-0.1.0.tgz

Now, don't forget to dl() the extension (bad...) or add it to your php.ini (good!)

If this works for you and you find it useful, you can always visit my PECL profile. It does have a wishlist URL if you have an urgent need to thank me.