need some kind of "coherence index" for a group of strings

jladasky at itu.edu jladasky at itu.edu
Thu Nov 3 18:47:29 EDT 2016


On Thursday, November 3, 2016 at 1:09:48 PM UTC-7, Neil D. Cerutti wrote:
> you may also be 
> able to use some items "off the shelf" from Python's difflib.

I wasn't aware of that module, thanks for the tip!

difflib.SequenceMatcher.ratio() returns a numerical value which represents the "similarity" between two strings.  I don't see a precise definition of "similar", but it may do what the OP needs.




More information about the Python-list mailing list