TermSimilarityMixin class Null safety

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.
read-only, inherited
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.
read-only, inherited
editSimilarity double
A normalized measure of editDistance on a scale of 0.0 to 1.0.
read-only, inherited
hashCode int
The hash code for this object.
read-only, override
jaccardSimilarity double
Returns the Jaccard Similarity Index between term and other.
read-only, inherited
lengthDistance int
Returns the absolute value of the difference in length between term and other.
read-only, inherited
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))
read-only, inherited
other String
The term that is being compared to term.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
similarity double
The compound similarity value on a scale of 0.0 to 1.0.
read-only, inherited
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. ///
read-only, inherited
term String
The term that is being compared to other.
read-only, inherited

Methods

compareTo(TermSimilarity other) int
Compares this to other, alphabetically, non-case sensitive.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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