Class Levenshtein
Provides a method to computer the Levenshtein distance between two strings.
Inheritance
Namespace: Algenta.Colectica.Model.Utility
Assembly: Algenta.Colectica.Model.dll
Syntax
public static class Levenshtein : object
Remarks
In information theory and computer science, the Levenshtein distance is a metric for measuring the amount of difference between two sequences (i.e. an edit distance). The term edit distance is often used to refer specifically to Levenshtein distance. The Levenshtein distance between two strings is defined as the minimum number of edits needed to transform one string into the other, with the allowable edit operations being insertion, deletion, or substitution of a single character. It is named after Vladimir Levenshtein, who considered this distance in 1965. Levenshtein distance. (2011, May 11).
Methods
Compute(String, String)
Compute the distance between two strings.
Declaration
public static int Compute(string s, string t)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | |
System.String | t |
Returns
Type | Description |
---|---|
System.Int32 |
Remarks
In information theory and computer science, the Levenshtein distance is a metric for measuring the amount of difference between two sequences (i.e. an edit distance). The term edit distance is often used to refer specifically to Levenshtein distance. The Levenshtein distance between two strings is defined as the minimum number of edits needed to transform one string into the other, with the allowable edit operations being insertion, deletion, or substitution of a single character. It is named after Vladimir Levenshtein, who considered this distance in 1965. Levenshtein distance. (2011, May 11).