Creating "Did you mean?" word spell check

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Creating "Did you mean?" word spell check

Post by kendall »

hi,

I'm trying to create a custom glossary using word slangs language that is not necessarily apart of the English Dictionary Language. How does google and other search engine do this? i have been looking up the SOUNDEX function. Is this is what is being used in these instances? Has anyone been successful in using it on custom words?
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Re: Creating "Did you mean?" word spell check

Post by Mordred »

I have used http://bg2.php.net/levenshtein with good results to handle misspellings. Slang words discovery seems to be another topic, and neither levenstein nor soundex sound (pun not intended) right for the job. It seems you have to explain more on what you need, perhaps with some examples.
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Re: Creating "Did you mean?" word spell check

Post by kendall »

Mordred wrote:I have used http://bg2.php.net/levenshtein with good results to handle misspellings. Slang words discovery seems to be another topic, and neither levenstein nor soundex sound (pun not intended) right for the job. It seems you have to explain more on what you need, perhaps with some examples.
Well I was hoping that the I would have been able to use the function to get words that may be similar in spelling in the database with that of the user's input.

the function you recommended and also similar_text() seems like it might just work. Ill look for the MYSQL versions of these functions....


thanks
Post Reply