C# 클래스 Lucene.Net.Search.Spell.NGramDistance

N-Gram version of edit distance based on paper by Grzegorz Kondrak, "N-gram similarity and distance". Proceedings of the Twelfth International Conference on String Processing and Information Retrieval (SPIRE 2005), pp. 115-126, Buenos Aires, Argentina, November 2005. http://www.cs.ualberta.ca/~kondrak/papers/spire05.pdf This implementation uses the position-based optimization to compute partial matches of n-gram sub-strings and adds a null-character prefix of size n-1 so that the first character is contained in the same number of n-grams as a middle character. Null-character prefix matches are discounted so that strings with no matching characters will return a distance of 0.
상속: IStringDistance
파일 보기 프로젝트 열기: apache/lucenenet 1 사용 예제들

공개 메소드들

메소드 설명
Equals ( object obj ) : bool
GetDistance ( string source, string target ) : float
GetHashCode ( ) : int
NGramDistance ( ) : System

Creates an N-Gram distance measure using n-grams of size 2.

NGramDistance ( int size ) : System

Creates an N-Gram distance measure using n-grams of the specified size.

ToString ( ) : string

메소드 상세

Equals() 공개 메소드

public Equals ( object obj ) : bool
obj object
리턴 bool

GetDistance() 공개 메소드

public GetDistance ( string source, string target ) : float
source string
target string
리턴 float

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int

NGramDistance() 공개 메소드

Creates an N-Gram distance measure using n-grams of size 2.
public NGramDistance ( ) : System
리턴 System

NGramDistance() 공개 메소드

Creates an N-Gram distance measure using n-grams of the specified size.
public NGramDistance ( int size ) : System
size int The size of the n-gram to be used to compute the string distance.
리턴 System

ToString() 공개 메소드

public ToString ( ) : string
리턴 string