50 {
return m_maxDepthStack; }
52 {
return m_maxTransitionsExplored; }
54 {
return m_maxNbResults; }
56 {
return m_maxResultSize; }
59 { m_maxDepthStack=val; }
61 { m_maxTransitionsExplored=val; }
63 { m_maxNbResults=val; }
65 { m_maxResultSize=val; }
68 uint64_t m_maxDepthStack;
69 uint64_t m_maxTransitionsExplored;
70 uint64_t m_maxNbResults;
71 uint64_t m_maxResultSize;
96 Automaton(
const std::string& automId =
"" );
150 const uint64_t n)
const;
191 void setActionHash(
const std::vector<std::pair<LimaString,Constraint> >& actionsWithOneArgument);
202 typedef std::set<AutomatonMatch,CompareAutomatonMatch>
338 std::vector<std::pair<std::deque<LinguisticGraphVertex>,
const Transition*> >& matchingTransitions,
399 const uint64_t n)
const {
413inline std::vector<Transition>
const&
#define LIMA_AUTOMATON_EXPORT
QDebug & operator<<(QDebug &qd, const std::string &str)
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
␈rief a class for control parameters for the search using the automata
uint64_t getMaxTransitionsExplored() const
void setMaxResultSize(const uint64_t val)
uint64_t getMaxResultSize() const
uint64_t getMaxDepthStack() const
void setMaxNbResults(const uint64_t val)
uint64_t getMaxNbResults() const
void setMaxTransitionsExplored(const uint64_t val)
void setMaxDepthStack(const uint64_t val)
bool operator()(const AutomatonMatch &r1, const AutomatonMatch &r2) const
void makeFinal(const Tstate state)
make a state final
void removeState(const Tstate state)
friend class AutomatonReader
bool m_deterministic
a boolean flag indicating if the automaton is deterministic or not
Tstate addState(bool is_final=false)
add a state to the automaton
std::pair< RecognizerMatch, ConstraintCheckList > AutomatonMatch
types defined to store the result (or results of the application of the automaton on a graph
std::vector< Transition > const & getTransitionsState(const Tstate state) const
get the list of transitions leaving from a given state
bool hasTransitionsState(const Tstate state) const
test if a state of the automaton has out transitions
void init()
profix of identifier of transition
bool getMatchingTransitions(const LinguisticAnalysisStructure::AnalysisGraph &graph, const LinguisticGraphVertex &vertex, AnalysisContent &analysis, const SearchGraph *searchGraph, const Tstate &state, std::vector< std::pair< std::deque< LinguisticGraphVertex >, const Transition * > > &matchingTransitions, const LinguisticGraphVertex &limit) const
bool existsEpsilonPathToFinal(const Tstate state) const
Automaton subsets() const
make deterministic automaton with the subsets method (does not change the current instance of the aut...
uint64_t numberOfTransitions() const
get the number of transitions in the automaton
bool getBestMatch(const LinguisticAnalysisStructure::AnalysisGraph &graph, const LinguisticGraphVertex &begin, const LinguisticGraphVertex &limit, AnalysisContent &analysis, RecognizerMatch &longestMatch, ConstraintCheckList &checkList, const SearchGraphSense sense, const AutomatonControlParams &controlParams) const
test if a text corresponds to the automaton : the text is represented as a LinguisticAnalysisStructur...
bool addTransition(Tstate initialState, Tstate finalState, TransitionUnit *transition)
add a transition between two states
bool getAllMatches(const LinguisticAnalysisStructure::AnalysisGraph &graph, const LinguisticGraphVertex &begin, const LinguisticGraphVertex &limit, AnalysisContent &analysis, AutomatonMatchSet &allMatches, ConstraintCheckList &checkList, ForwardSearch &forward, BackwardSearch &backward, const SearchGraphSense sense, const AutomatonControlParams &controlParams) const
get all matches found between automaton and graph between two points (WARNING: in case of backward se...
std::vector< bool > m_finalStates
which states are final states
Tstate numberOfStates() const
get the number of states of the automaton
void reinit()
reinitializes the automaton (no states, no transitions)
Transition const & nthTransition(const Tstate state, const uint64_t n) const
find the nth transition leaving from a particular state
bool isFinalState(const Tstate state) const
test if a given state is a final state of the automaton
std::vector< TransitionUnit * > collectTransitions() const
void copy(const Automaton &a)
std::vector< std::vector< Transition > > m_transitions
the transitions
bool isFinalSubset(const SubSet &v) const
Tstate m_numberStates
number of states in the automaton
void reachableStates(const SubSet &states, const TransitionUnit &t, SubSet &reachable) const
std::set< Tstate > SubSet
friend class AutomatonWriter
bool testFromState(const Tstate firstState, const LinguisticAnalysisStructure::AnalysisGraph &graph, const LinguisticGraphVertex &begin, const LinguisticGraphVertex &limit, AnalysisContent &analysis, AutomatonMatchSet &results, ConstraintCheckList &checkList, DFSStack &stack, const AutomatonControlParams &controlParams) const
std::string subsetString(const SubSet &subset) const
Automaton(const std::string &automId="")
void constructor initializes an empty automaton (no state, no transition)
bool isDeterministic() const
test if the automaton is deterministic or not
std::vector< TransitionSearchStructure< Transition > * > m_searchStructures
void removeTransition(const Tstate initialState, const TransitionUnit &transition)
std::vector< Tstate > finalStates() const
get the list of the final states of the automaton
void unMakeFinal(const Tstate state)
remove a state from the final states
void setActionHash(const std::vector< std::pair< LimaString, Constraint > > &actionsWithOneArgument)
set a property hashcode to each transition which represent the constraint(s?) of type action attached...
void initializeSearchStructures(MediaId language)
Automaton brzozowskiMinimize() const
Brzozowski's algorithm for minimization : double reverse and determinization (does not change the cur...
std::set< AutomatonMatch, CompareAutomatonMatch > AutomatonMatchSet
void setDeterministic(const bool det)
set the flag indicating if the automaton is deterministic or not (does not make the automaton determi...
An AnalysisData containing a LinguisticGraph with a language and an id.
SearchGraphSense
enumerated type to indicate in which sense the automaton should be built or searched
std::vector< ConstraintCheckListElement > ConstraintCheckList
PUGI__FN void reverse(I begin, I end)