Namespace: Assorted.Utils.Text
Assembly: Assorted.Utils (Assorted.Utils.dll) version 1.1.0.0
Returns the normalized Damerau-Levenshtein distance between two strings.
public static double DamerauLevenshteinSimilarityTo(this string source, string other)
source
: string
The source string.
other
: string
The other string.
double
A value between 0
and 1
such that 0
equates to no similarity and 1
is an exact match.
Exception | Description |
---|---|
System.ArgumentNullException | source or other is null . |
The Damerau-Levenshtein distance is defined as the minimum number of primitive edit operations needed to transform one text into the other and these operations are substitution, deletion, insertion and the transposition of two adjacent characters.
- Assorted.Utils.Text Namespace
- StringExtensions Class
- JaroSimilarityTo(this string, string)
- JaroWinklerSimilarityTo(this string, string, int)
This document is generated by DG.