C# Class LevenshteinAutomaton.LevTAutomataImitation

Universal deterministic Levenshtein automaton for Damerau-Levenshtein distance
Afficher le fichier Open project: ibendrup/LevenshteinAutomaton Class Usage Examples

Méthodes publiques

Свойство Type Description
N int
StateCount int
VectorCount int
VectorLength int
W int
Word string

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
UpdateMatricies ( ) : void

Select current state transition matrix and offset increment matrix

Method Details

AcceptWord() public méthode

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
Résultat bool

GetCharacteristicVector() public méthode

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

GetNextState() public méthode

Evaluate next automaton state (without actual transition)
public GetNextState ( int vector ) : AutomatonState
vector int Characteristic vector.
Résultat AutomatonState

IsAcceptState() public méthode

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

LevTAutomataImitation() public méthode

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

LoadState() public méthode

Loads automaton state and offset.
public LoadState ( int state, int offset ) : void
state int State.
offset int Offset.
Résultat void

NextState() public méthode

Make transition to the next state for the given letter
public NextState ( char letter ) : void
letter char Letter.
Résultat void

NextState() public méthode

Make transition to the next state for the given characteristic vector
public NextState ( int vector ) : void
vector int Vector.
Résultat void

UpdateMatricies() protected méthode

Select current state transition matrix and offset increment matrix
protected UpdateMatricies ( ) : void
Résultat void

Property Details

N public_oe property

Allowed modifications count
public int N
Résultat int

StateCount public_oe property

The state count.
public int StateCount
Résultat int

VectorCount public_oe property

Possible characteristic vector value count
public int VectorCount
Résultat int

VectorLength public_oe property

Characteristic vector length
public int VectorLength
Résultat int

W public_oe property

Word length
public int W
Résultat int

Word public_oe property

The word.
public string Word
Résultat string