"Zitoun" <o.beon (AT) voila (DOT) fr> wrote
Quote:
Hello,
I'm looking for some code which allows the user to see some
suggestions extracted from a reference table, when the orthography of
the input name on the form is not exact. I had a look on the soundex
procedure but i don't find it efficient. Does somebody know which
algorithm is used by sites like yellow pages to suggest cities name
when input is wrong ?
Thanks all lot
Regards |
Soundex is normally best for finding words that sound alike. Those words are
not necessarily *spelled* alike. Soundex will not find words that are
spelled alike, but do not sound alike.
If your data consists of multiple worlds, a good approach is to look for
matches where each word has the first 2 matching characters. For example,
when the user enters "North Melbourne" (an australian example), you could
look for matches like "no* me*" - "North Melborne", "Nothe Melburne" etc.
HTH,
TC