Forum Moderators: phranque
I see i nthe other thread your'e using PHP.
Check out the soundex(), metaphone() and levenshtein() functions, all can be used to make some sort of spelling correction engine.
I posted a script a while back in here, wasn't anywhere near perfect but gave decent suggestions for misspelled words...
If you have a dictionary of words, you can use these functions to compute the similarity between a word in there and a word you want to check for spelling.
More than one way to skin a cat, sometimes more than one way to spell the same word too :)
>spell suggestions from a complete dictionary
The one i used was the unix dictionary, it's not "complete" but has 300,000 words in it, so you could use it to fine tune the script before the dictionary grows. There are a few other txt files you can grab hold of , or use something like www.dict.org/
You could have the dictionary in a flat file, or mysql table. Do post what you use ;) I'm looking for more info on this sort of thing too.