Percentage matching of text

John Lenton john at grulic.org.ar
Fri Jul 30 21:02:23 CEST 2004


On Fri, Jul 30, 2004 at 12:32:14PM -0600, Bruce Eckel wrote:
> 
> It seems like there's no way to get real_quick_ratio() to say anything
> except "it's a perfect match!" I'm wondering if someone didn't leave a
> code stub unwritten:
> 
> def real_quick_ratio(self): return 1.0

real_quick_ratio uses the length of the strings to determine an upper
bound on the ratio. You can use it as part of an incremental scheme if
you need something better than an upper bound.

-- 
John Lenton (john at grulic.org.ar) -- Random fortune:
Q:	What do you say to a New Yorker with a job?
A:	Big Mac, fries and a Coke, please!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20040730/801add07/attachment.pgp>


More information about the Python-list mailing list