Help on finding word is valid as per English Dictionary through python
Thomas Jollans
thomas at jollans.com
Fri Jun 25 09:49:41 EDT 2010
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
>
More information about the Python-list
mailing list