|
Home > Archive > MySQL Server Forum > March 2005 > SOUNDEX function / in php - how to ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SOUNDEX function / in php - how to ?
|
|
| siliconmike 2005-03-31, 7:01 am |
| 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
| |
| Philip Ronan 2005-03-31, 7:01 am |
| 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/
|
|
|
|
|