On 06/25/2010 03:30 PM, anu python wrote: > Hi, > I have a text file , > a.txt > ------------------------ > > this is a lcose button > > where u can observer "lcose" is not a valid word.It's typing > mistake.Actual word is "close". > > How can i check that each word entered in txt file having correct > meaningful words as per English Dictionary. > > Do you have any package which can check "English Dictionary"
In a pinch, I might use open("/usr/share/dict/words", "r") as a thesaurus, and check for words in there. Read the file and create a giant frozenset or something. For something a bit more civilized, I expect that there's a python package interfacing at least one of (ispell, aspell, hunspell, myspell) (and what they're all called. There is a multitude of "English dictionaries". Some don't even include "neighbour", imagine that! > > Please help me. > > Thanks, > Anu > -- http://mail.python.org/mailman/listinfo/python-list