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
http://www.olivierhill.ca/doublemetaphone-0.1.0.tgz
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.


Trackbacks

Olivier's Blog on : DoubleMetaphone 1.1

Show preview
A couple of minutes after posting DoubleMetaphone 0.1.0, someone with a C99 compiler noticed that my mixed C/C++ code wasn't compiling. The error? The use of the boolean true. So I rolled up 0.1.1, which is simply a four characters fix. You can downloa

Comments

Display comments as Linear | Threaded

Add Comment

Form options