Does python have a function like similar_text in PHP

Andreas Jung andreas at zope.com
Fri Mar 1 13:24:35 EST 2002


I wrote a Python extension that implements the Levenshtein algorithm
that PHP uses too. The same extension als contains implementations
for soundex and metaphone.

Available from the CVS:

   http://sourceforge.net/projects/pyproximity

Andreas

----- Original Message -----
From: "Tim Peters" <tim_one at email.msn.com>
To: <python-list at python.org>
Sent: Friday, March 01, 2002 13:18
Subject: RE: Does python have a function like similar_text in PHP


> [ron nixon]
> > Does anyone know if Python has a function like similar_text in PHP. It
> > compares two strings and returns a percentage for the match.
>
> The .ratio() method of SequenceMatcher objects looks like a similar
gimmick,
> returning a "similarity score" as a float in [0, 1]:
>
>     http://www.python.org/doc/current/lib/sequence-matcher.html
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>





More information about the Python-list mailing list