LevenshteinUtils class abstract final

Utilities for Levenshtein edit distance and derived metrics.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

distance(String a, String b) int
Returns the Levenshtein (edit) distance between a and b.
fuzzyContains(String source, String target, int maxDistance) bool
Returns true if source contains a substring within maxDistance edits of target, using a sliding window the width of target.
ratio(String a, String b) double
Returns a similarity ratio in the range 0.0 (no similarity) to 1.0 (identical).