termSimilarityMap method
Returns an hashmap of terms
to TermSimilarity with this term.
k
is thek
-gram length used to calculate jaccardSimilarity, defaults to 2.
Not case-sensitive.
Implementation
Map<String, TermSimilarity> termSimilarityMap(Iterable<String> terms,
{int k = 2}) {
final retVal = <String, TermSimilarity>{};
for (final other in terms) {
retVal[other] = TermSimilarity(this, other, k: k);
}
return retVal;
}