jaccardSimilarityMap method Null safety
Returns a hashmap of terms to Jaccard Similarity Index with this term
using a k-gram length of k.
Implementation
Map<Term, double> jaccardSimilarityMap(Iterable<Term> terms, [int k = 3]) {
final retVal = <Term, double>{};
final termGrams = kGrams(k);
for (final other in terms) {
retVal[other] = _jaccardSimilarity(termGrams, other, k);
}
return retVal;
}