C# Class Microsoft.Automata.EditDistance

Show file Open project: AutomataDotNet/Automata

Public Methods

Method Description
GetClosestElement ( string str, Automaton automaton, CharSetSolver solver, int &distance, bool checkDeterminism = true ) : string

Based on paper Order-n correction for regular langauges, http://dl.acm.org/citation.cfm?id=360995

GetClosestElement ( string str, Automaton automaton, CharSetSolver solver, int bound, int &distance, bool checkDeterminism = true ) : string

Based on paper Order-n correction for regular langauges, http://dl.acm.org/citation.cfm?id=360995

GetEditDistance ( string str1, string str2 ) : int

String edit-distance between str1 and str2

Private Methods

Method Description
MoveFromStoT ( int S, int T, Automaton aut, CharSetSolver solver, char &witness ) : bool
MoveFromStoTContainsC ( char c, int S, int T, Automaton aut, CharSetSolver solver ) : bool
MoveFromStoTContainsC ( char c, int S, int T, Automaton aut, CharSetSolver solver, char &witness ) : bool
ShortStringStoT ( int S, int T, Automaton aut, int limit, CharSetSolver solver ) : string
ShortStringStoTwithC ( char c, int S, int T, Automaton aut, int limit, CharSetSolver solver ) : string

Method Details

GetClosestElement() public static method

Based on paper Order-n correction for regular langauges, http://dl.acm.org/citation.cfm?id=360995
public static GetClosestElement ( string str, Automaton automaton, CharSetSolver solver, int &distance, bool checkDeterminism = true ) : string
str string input string
automaton Automaton dfa for which you want to compute the distance
solver CharSetSolver character solver
distance int outputs the distance
checkDeterminism bool
return string

GetClosestElement() public static method

Based on paper Order-n correction for regular langauges, http://dl.acm.org/citation.cfm?id=360995
public static GetClosestElement ( string str, Automaton automaton, CharSetSolver solver, int bound, int &distance, bool checkDeterminism = true ) : string
str string input string
automaton Automaton dfa for which you want to compute the distance
solver CharSetSolver character solver
bound int depth of search for max string insertion
distance int outputs the distance
checkDeterminism bool
return string

GetEditDistance() public static method

String edit-distance between str1 and str2
public static GetEditDistance ( string str1, string str2 ) : int
str1 string
str2 string
return int