spell checking and "did you mean?"

spell checking and "did you mean?"

am 23.03.2006 20:22:24 von Peter Lovatt

Hi All

I am looking to check whether a keyword a user has entered already
exists in the database

I can find exact matches, but I am having trouble with typos.

I am looking for something like Google's "did you mean" if you type in
a close match.

SO if someone types in saet it returns "did you mean seat ?"

Any suggestions which is best - SOUNDEX in MySql or the php functions
levenshtein(), soundex(),metaphone() or similar_text() on the
returned result.

Any other suggestions welcome.

Thanks

Peter

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: spell checking and "did you mean?"

am 27.03.2006 03:22:57 von lifeofbrian

I believe Google Suggest uses the Levenshtein method. I would tend to
go with that rather than soundex in order to avoid being too
english-language-centric with your implementation.

--bemansell

On 3/23/06, peter lovatt wrote:
> Hi All
>
> I am looking to check whether a keyword a user has entered already
> exists in the database
>
> I can find exact matches, but I am having trouble with typos.
>
> I am looking for something like Google's "did you mean" if you type in
> a close match.
>
> SO if someone types in saet it returns "did you mean seat ?"
>
> Any suggestions which is best - SOUNDEX in MySql or the php functions
> levenshtein(), soundex(),metaphone() or similar_text() on the
> returned result.
>
> Any other suggestions welcome.
>
> Thanks
>
> Peter
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php