Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s=difflib.SequenceMatcher(isjunk,text1,text2)
- ratio =s.ratio()
- difflib.SequenceMatcher(lambda x: x in " tn", doc1, doc2).ratio()
- >>> s=difflib.SequenceMatcher(lambda x: x == 'n', s1, s2)
- >>> s.ratio()
- 0.94669848846459825
- >>> s=difflib.SequenceMatcher(lambda x: x in ' n', s1, s2)
- >>> s.ratio()
- 0.7653142402545744
- difflib.SequenceMatcher(lambda x: x in " tn", doc1, doc2).ratio()
- difflib.SequenceMatcher(" tn".__contains__, doc1, doc2).ratio()
Add Comment
Please, Sign In to add comment