TermSimilarityMixin class abstract

Mixin class that implements the == operator, compareTo, hashCode and toJson.

Implemented types
Implementers

Constructors

TermSimilarityMixin()

Properties

characterSimilarity double
Returns the similarity between the collection of letters of term and other on a scale of 0.0 to 1.0.
no setterinherited
editDistance int
Returns the Damerau–Levenshtein distance, the minimum number of single-character edits (transpositions, insertions, deletions or substitutions) required to change term into other.
no setterinherited
editSimilarity double
A normalized measure of editDistance on a scale of 0.0 to 1.0.
no setterinherited
hashCode int
The hash code for this object.
no setteroverride
jaccardSimilarity double
Returns the Jaccard Similarity Index between term and other.
no setterinherited
lengthDistance int
Returns the absolute value of the difference in length between term and other.
no setterinherited
lengthSimilarity double
Returns the similarity in length between two terms, defined as: lengthSimilarity = 1 minus the log of the ratio between the term lengths, with a floor at 0.0: 1-(log(this.length/other.length))
no setterinherited
other String
The term that is being compared to term.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
similarity double
The compound similarity value on a scale of 0.0 to 1.0.
no setterinherited
startsWithSimilarity double
Compares the starting charcters of the String with that of other, limiting the comparison to a substring of this or other that is the shorter of this.length or other.length. ///
no setterinherited
term String
The term that is being compared to other.
no setterinherited

Methods

compareTo(TermSimilarity other) int
Compares this to other, alphabetically, non-case sensitive.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes the TermSimilarity to Map<String, dynamic>.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
Returns true if runtimeType, term and similarity are equal.
override