469,167 Members | 1,271 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,167 developers. It's quick & easy.

SOUNDEX function / in php - how to ?

Hi I'm using SOUNDEX mysql function to find similar sounding names from
a table with 2 million distinct names.

Unfortunately there is a single soundex code for every 200,000 names!
Meaning there are only 200,000 distinct codes for 2 million entries.

Is there any other function / library / technique to work around this
immense 1:10 redundancy ?

for example, soundex for 'avis', 'apex' and 'apps' is A120, but I'd
like to differentiate between them in my search - meaning implement a
"stricter" sound comparison than the soundex function offers.

Anything in PHP?

Any pointers would be great
Mike

Jul 23 '05 #1
1 3224
siliconmike wrote:
Hi I'm using SOUNDEX mysql function to find similar sounding names from
a table with 2 million distinct names.

Unfortunately there is a single soundex code for every 200,000 names!
Meaning there are only 200,000 distinct codes for 2 million entries.

Is there any other function / library / technique to work around this
immense 1:10 redundancy ?

for example, soundex for 'avis', 'apex' and 'apps' is A120, but I'd
like to differentiate between them in my search - meaning implement a
"stricter" sound comparison than the soundex function offers.

Anything in PHP?


Soundex is rather clumsy for this purpose. Use metaphone() instead, then use
the levenshtein() function to sort the results based on their similarity to
the search term

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by fartsniff | last post: by
6 posts views Thread by Ricky Romaya | last post: by
1 post views Thread by siliconmike | last post: by
3 posts views Thread by arthur benedetti white | last post: by
32 posts views Thread by vonclausowitz | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.