C# 클래스 LevenshteinAutomaton.LevTAutomataImitation

Universal deterministic Levenshtein automaton for Damerau-Levenshtein distance
파일 보기 프로젝트 열기: ibendrup/LevenshteinAutomaton 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
N int
StateCount int
VectorCount int
VectorLength int
W int
Word string

공개 메소드들

메소드 설명
AcceptWord ( string word ) : bool

Check if this automaton accepts given word (i.e. edit distance between Word and word <= N)

GetCharacteristicVector ( char letter, int position ) : int

Gets the characteristic vector for given letter and position.

GetNextState ( int vector ) : AutomatonState

Evaluate next automaton state (without actual transition)

IsAcceptState ( int state, int offset ) : bool

Check if given state is the accept state for given offset

LevTAutomataImitation ( string word, int n ) : System

Initializes a new instance of the LevTAutomataImitation class.

LoadState ( int state, int offset ) : void

Loads automaton state and offset.

NextState ( char letter ) : void

Make transition to the next state for the given letter

NextState ( int vector ) : void

Make transition to the next state for the given characteristic vector

보호된 메소드들

메소드 설명
UpdateMatricies ( ) : void

Select current state transition matrix and offset increment matrix

메소드 상세

AcceptWord() 공개 메소드

Check if this automaton accepts given word (i.e. edit distance between Word and word <= N)
public AcceptWord ( string word ) : bool
word string Word to check
리턴 bool

GetCharacteristicVector() 공개 메소드

Gets the characteristic vector for given letter and position.
public GetCharacteristicVector ( char letter, int position ) : int
letter char Letter.
position int Position.
리턴 int

GetNextState() 공개 메소드

Evaluate next automaton state (without actual transition)
public GetNextState ( int vector ) : AutomatonState
vector int Characteristic vector.
리턴 AutomatonState

IsAcceptState() 공개 메소드

Check if given state is the accept state for given offset
public IsAcceptState ( int state, int offset ) : bool
state int State.
offset int Offset.
리턴 bool

LevTAutomataImitation() 공개 메소드

Initializes a new instance of the LevTAutomataImitation class.
public LevTAutomataImitation ( string word, int n ) : System
word string Word
n int Maximum edit distance
리턴 System

LoadState() 공개 메소드

Loads automaton state and offset.
public LoadState ( int state, int offset ) : void
state int State.
offset int Offset.
리턴 void

NextState() 공개 메소드

Make transition to the next state for the given letter
public NextState ( char letter ) : void
letter char Letter.
리턴 void

NextState() 공개 메소드

Make transition to the next state for the given characteristic vector
public NextState ( int vector ) : void
vector int Vector.
리턴 void

UpdateMatricies() 보호된 메소드

Select current state transition matrix and offset increment matrix
protected UpdateMatricies ( ) : void
리턴 void

프로퍼티 상세

N 공개적으로 프로퍼티

Allowed modifications count
public int N
리턴 int

StateCount 공개적으로 프로퍼티

The state count.
public int StateCount
리턴 int

VectorCount 공개적으로 프로퍼티

Possible characteristic vector value count
public int VectorCount
리턴 int

VectorLength 공개적으로 프로퍼티

Characteristic vector length
public int VectorLength
리턴 int

W 공개적으로 프로퍼티

Word length
public int W
리턴 int

Word 공개적으로 프로퍼티

The word.
public string Word
리턴 string