spell checking

Erik Heneryd erik at heneryd.com
Sun Oct 31 04:02:49 EST 2004


dataangel wrote:

> I was just curious if there were any spell checker python modules around 
> that can guess at what the user meant to type in. I wrote up a quick 
> function that splices a string up into bigrams and then checks how many 
> bigrams are identical to a given word, which I think is how google does 
> it. But support for trigrams etc. could be added, so I'm curious if 
> anyone out there has done something more. Here's the script:

One tip is Levenshtein distance.  Some pointers:

http://www.merriampark.com/ld.htm
http://www.hetland.org/python/distance.py
http://trific.ath.cx/resources/python/levenshtein/


Erik




More information about the Python-list mailing list