By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,253 Members | 1,676 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,253 IT Pros & Developers. It's quick & easy.

SOUNDEX function / in php - how to ?

P: n/a
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 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.