jaccardSimilarities method

List<SimilarityIndex> jaccardSimilarities(
  1. Iterable<String> terms, [
  2. int k = 2
])

Returns a ordered list of SimilarityIndex values for the terms, in descending order of SimilarityIndex.similarity using a k-gram length of k. k defaults to 2.

Not case-sensitive.

Implementation

List<SimilarityIndex> jaccardSimilarities(Iterable<String> terms,
        [int k = 2]) =>
    jaccardSimilarityMap(terms, k)
        .entries
        .map((e) => SimilarityIndex(e.key, e.value))
        .sortBySimilarity();