similarity library

Functions

dLDistance(List<int> listA, List<int> listB, {int sigma = 256}) int
The Damerau-Levenshtein Distance calculates the Damerau-Levenshtein distance between lists of integers, usual string code units. See string_functions.dart for string based implementation. Used for similarity see dLSimilarity. Considers substitution, insertion, deletion, and transposition. Slower than The Levenshtein distance algorithm but more accurate, since it considers transposition. See the OSA implementation for a faster, but slightly less accurate version. https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance sigma is the maximum different characters in the character set, 256 assumes ascii
dLSimilarity(List<int> a, List<int> b, {int sigma = 256}) double
Similarity using Damerau-Levenshtein Distance
dLStringDistance(String stringA, String stringB, {int sigma = 256}) int
The Damerau-Levenshtein Distance calculates the Damerau-Levenshtein distance between two strings. Used for similarity see dLSimilarity. Considers substitution, insertion, deletion, and transposition. Slower than The Levenshtein distance algorithm but more accurate, since it considers transposition. See the OSA implementation for a faster, but slightly less accurate version. https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance sigma is the maximum different characters in the character set, 256 assumes ascii
dLStringSimilarity(String a, String b, {int sigma = 256}) double
Similarity using Damerau-Levenshtein Distance
osaDistance(List<int> listA, List<int> listB) int
Optimal string alignment (OSA) algorithm computes the number of edit operations needed to make the strings equal under the condition that no substring is edited more than once. Damerau–Levenshtein makes no such assumption. Thus this algorithm is less precise but faster.
osaSimilarity(List<int> a, List<int> b) double
Similarity using Optimal string alignment (OSA) distance
osaStringDistance(String a, String b) int
Levenshtein distance is a string metric for measuring the difference between two sequences. Informally, the Levenshtein distance between two words is the minimum number of single-character edits (insertions, deletions or substitutions) required to change one word into the other
osaStringSimilarity(String a, String b) double
Levenshtein distance is a string metric for measuring the difference between two sequences. Informally, the Levenshtein distance between two words is the minimum number of single-character edits (insertions, deletions or substitutions) required to change one word into the other