Jaccard similarity function that measures the similarity between sentences/documents and provide a similarity score based on how similar the sentences are compared to each other.
The formula in notation is: J(X,Y) = |X∩Y| / |X∪Y|
In Steps, that’s:
- Count the number of members which are shared between both sets.
- Count the total number of members in both sets (shared and un-shared).
- Divide the number of shared members (1) by the total number of members (2).