C# Class Spontaneuos.Lib.SiftStringSimilarity.StringSift3

Computes the distance and similarity between two strings a lot faster than Levenshtein
Afficher le fichier Open project: pashkov/Spontaneous Class Usage Examples

Méthodes publiques

Méthode Description
Distance ( string s1, string s2 ) : float

Calculate a distance similar to Levenstein, but faster and less reliable.

Similarity ( string s1, string s2 ) : float

Calculate the similarity of two strings, as a percentage.

StringSift3 ( ) : System

Instantiate the class with a default value of MaxOffset=5

StringSift3 ( int maxOffset ) : System

MaxOffset represents the maximum range the algorithm searches for the same character It is cheaper to replace a character rather than move it from a distance larger than MaxOffset.

Method Details

Distance() public méthode

Calculate a distance similar to Levenstein, but faster and less reliable.
public Distance ( string s1, string s2 ) : float
s1 string
s2 string
Résultat float

Similarity() public méthode

Calculate the similarity of two strings, as a percentage.
public Similarity ( string s1, string s2 ) : float
s1 string
s2 string
Résultat float

StringSift3() public méthode

Instantiate the class with a default value of MaxOffset=5
public StringSift3 ( ) : System
Résultat System

StringSift3() public méthode

MaxOffset represents the maximum range the algorithm searches for the same character It is cheaper to replace a character rather than move it from a distance larger than MaxOffset.
public StringSift3 ( int maxOffset ) : System
maxOffset int
Résultat System