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|
Implement the Jaccard similarity function which, given two strings
s
andt
, and given a Tokenizer instancetokens
, returns the jaccard similarity betweentokens(s)
andtokens(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|