termSimilarityMap method

Map<String, TermSimilarity> termSimilarityMap(
  1. Iterable<String> terms, {
  2. int k = 2,
})

Returns an hashmap of terms to TermSimilarity with this term.

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;
}