20#ifndef RECOGNIZERDATA_H
21#define RECOGNIZERDATA_H
32#define APPRLOGINIT LOGINIT("LP::ApplyRecognizer")
37 public std::vector<std::vector< Automaton::RecognizerMatch > >
46 const uint64_t sentenceId=0);
48 inline const std::string&
getGraphId()
const {
return m_graphId; }
51 std::string m_graphId;
90 std::set< std::pair<LinguisticGraphVertex, LinguisticGraphVertex > >& storedEdges
96 void deleteResultData();
101 inline const std::string&
getGraphId()
const {
return m_resultData->getGraphId(); }
103 inline const std::set< LinguisticGraphVertex >&
getNextVertices()
const {
return m_nextVertices; }
104 inline std::set< LinguisticGraphVertex >&
getNextVertices() {
return m_nextVertices; }
107 template<
typename ValueType>
112 m_entityFeatures.setFeature<ValueType>(name,value);
114 template<
typename ValueType>
118 m_entityFeatures.addFeature<ValueType>(name,value);
120 template<
typename ValueType>
125 m_entityFeatures.appendFeature<ValueType>(name,value);
129 m_embededEntities.insert(vertex);
133 return (m_embededEntities.find(vertex) != m_embededEntities.end());
135 void clearEntityFeatures();
145 std::set<LinguisticGraphVertex> m_verticesToRemove;
146 std::set< std::pair<LinguisticGraphVertex, LinguisticGraphVertex> > m_edgesToRemove;
148 uint64_t m_currentSentence;
149 std::set< LinguisticGraphVertex > m_nextVertices;
154 std::set< LinguisticGraphVertex > m_embededEntities;
#define LIMA_AUTOMATON_EXPORT
boost::graph_traits< LinguisticGraph >::edge_descriptor LinguisticGraphEdge
typedefs to simplify the access to various graphs elements
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, LinguisticVertexProperties > LinguisticGraph
Property to identify the chains in the graph.
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
just for semantics: base class for analysisData
void setEntityFeature(const std::string &name, const ValueType &value)
void addEntityFeature(const std::string &name, const ValueType &value)
void storeVerticesToRemove(const Automaton::RecognizerMatch &result, LinguisticGraph *graph)
void clearVerticesToRemove()
std::set< LinguisticGraphVertex > & getNextVertices()
void appendEntityFeature(const std::string &name, const ValueType &value)
void setNextVertex(LinguisticGraphVertex v)
void clearEdgesToRemove()
const std::string & getGraphId() const
void addVertexAsEmbededEntity(const LinguisticGraphVertex &vertex)
bool hasStoredResults() const
const std::set< LinguisticGraphVertex > & getNextVertices() const
bool hasVertexAsEmbededEntity(const LinguisticGraphVertex &vertex) const
Automaton::EntityFeatures & getEntityFeatures()
bool matchOnRemovedVertices(const Automaton::RecognizerMatch &result) const
RecognizerResultData(const std::string &sourceGraph)
void insert(const Automaton::RecognizerMatch &m, const uint64_t sentenceId=0)
const std::string & getGraphId() const
a list of generic features: each feature is unique (only one feature for a name)