KGramParserExtension extension Null safety
Extension methods on Term.
- on
-
- Term
Methods
-
jaccardSimilarity(
Term other, [int k = 3]) → double -
Returns the Jaccard Similarity Index between this term and
otherusing a k-gram length ofk. -
jaccardSimilarityMap(
Iterable< Term> terms, [int k = 3]) → Map<Term, double> -
Returns a hashmap of
termsto Jaccard Similarity Index with this term using a k-gram length ofk. -
kGrams(
[int k = 3]) → Set< KGram> - Returns a set of k-grams in the term.
-
lengthDistance(
Term other) → double -
Returns a normalized measure of difference between this
Termandotheron a log (base 2) scale: -
lengthSimilarity(
Term other) → double -
Returns the similarity in length between this string and
otherwhere: lengthSimilarity = 1 - lengthDistance if lengthDistance. -
lengthSimilarityMap(
Iterable< Term> terms) → Map<Term, double> -
Returns a hashmap of
termsto their lengthSimilarity with this.