[Tutor] stopping at 100 entries
Daniel Yoo
dyoo@hkn.eecs.berkeley.edu
Mon, 9 Oct 2000 22:26:38 -0700 (PDT)
On Mon, 9 Oct 2000, Deirdre Saoirse wrote:
> On Sat, 7 Oct 2000, Daniel Yoo wrote:
>
> > Imagine if we wanted to go through a list of names:
> >
> > ###
> > >>> for name in ['herimone', 'potter', 'weasley']:
> > ... print "Hello,", name
> > ...
> > Hello, herimone
>
> That's Hermione. :) (her-MY-oh-knee)
> Speaking as another woman with a difficult-to-pronounce name....
Oh my, I did it again! *sob* I have a very hard time with names. A few
days ago, I spelled "Ron" as "Rob".
I'd better make this Python-relevant.
misspeled = 'Rob'
corrected = misspeled[0:-1] + 'n'
I was curious; is there a python module that, given a list of words and a
misspelled word, returns back the "most similar" word? I do remember
reading about an algorithm that would give the "distance" between two
words, but I haven't found it in Parnassus.