C# 클래스 Spontaneuos.Lib.SiftStringSimilarity.StringSift3

Computes the distance and similarity between two strings a lot faster than Levenshtein
파일 보기 프로젝트 열기: pashkov/Spontaneous 1 사용 예제들

공개 메소드들

메소드 설명
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.

메소드 상세

Distance() 공개 메소드

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

Similarity() 공개 메소드

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

StringSift3() 공개 메소드

Instantiate the class with a default value of MaxOffset=5
public StringSift3 ( ) : System
리턴 System

StringSift3() 공개 메소드

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
리턴 System