OlivierBinette / StringCompare

Efficient String Comparison Functions and Fuzzy String Matching
https://olivierbinette.github.io/StringCompare/
17 stars 2 forks source link

Implement Jaccard similarity function in Python #6

Open OlivierBinette opened 2 years ago

OlivierBinette commented 2 years ago

Implement the Jaccard similarity function which, given two strings s and t, and given a Tokenizer instance tokens, returns the jaccard similarity between tokens(s) and tokens(t).

Here a tokenizer is a function which transforms a string into a set (or a multiset). The Jaccard similarity between two sets A and B is defined as |A and B|/|A or B|