This question evaluates string tokenization, set-based similarity metrics (Jaccard index) and basic set operations, testing competency in text processing and algorithmic reasoning within the Coding & Algorithms domain and requiring practical application of these concepts.
Given two strings a and b, compute their Jaccard similarity based on token sets.
Let A be the token set from a and B from b.
Return the similarity as a floating-point number.
1.0
.
a = "I like coffee, coffee"
b = "coffee is great"
A = {i, like, coffee}
B = {coffee, is, great}
0.2