28namespace LinguisticProcessing {
29namespace EventAnalysis {
48 unsigned int cardinality)
50 back().addElement(role,elt,cardinality);
61 LDEBUG <<
"set Current Template Type " << type;
63 LDEBUG <<
"bak.getType " << back().getType();
74 for (std::vector<EventTemplate>::const_iterator it= begin(); it!= end();it++)
77 if (! templateElements.empty()) {
82 event->push_back(eventPar);
87 eventPar->
setId(eventNum);
89 uint64_t posBeginPar(ULONG_MAX);
90 uint64_t posEndPar(0);
91 for(map<string,EventTemplateElement>::const_iterator it1= templateElements.begin(); it1!= templateElements.end();it1++)
96 Entity* e=createEntity(graph, v, annotationData, (*it1).first, eventNum);
101 if (posEnd > posEndPar) {
109 eventPar->
setLength(posEndPar-posBeginPar);
110 events->push_back(event);
117Entity* EventTemplateData::
121 const std::string& role,
122 uint64_t eventId)
const
135 std::set< AnnotationGraphVertex > matches = annotationData->
matches(graph->
getGraphId(),v,
"annot");
136 for (std::set< AnnotationGraphVertex >::const_iterator it = matches.begin();
137 it != matches.end(); it++)
144 pointerValue<SpecificEntityAnnotation>();
This file is the main header file for the data related to annotation graphs.
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
#define EVENTANALYSISLOGINIT
just for semantics: base class for analysisData
Holds an annotation graph and gives an API to manipulate it.
std::set< AnnotationGraphVertex > matches(const std::string &first, AnnotationGraphVertex firstVx, const std::string &second) const
Gets the set of vertices matched in the second graph by the given vertex of the first graph.
const GenericAnnotation & annotation(AnnotationGraphVertex v1, AnnotationGraphVertex v2, const LimaString &annot) const
a list of generic features: each feature is unique (only one feature for a name)
void setFeature(const std::string &name, const ValueType &value)
uint64_t getLength(void) const
uint64_t getPosition(void) const
void setPosition(uint64_t position)
void setLength(uint64_t length)
void addEntity(const Common::MediaticData::EntityType &type, Entity *entity)
void setTypeInCurrentTemplate(const std::string &)
void clearCurrentTemplate()
Events * convertToEvents(const Common::AnnotationGraphs::AnnotationData *annotationData) const
void addElementInCurrentTemplate(const std::string &role, const EventTemplateElement &elt, unsigned int cardinality)
This class represents a list of elements, that are pointers on polymmorphic annotations that can be d...
An AnalysisData containing a LinguisticGraph with a language and an id.
const std::string & getGraphId(void) const
const LinguisticGraph * getGraph(void) const
Returns the underlying graph structure.
holds surface data of a token
uint64_t position() const
const LimaString & stringForm() const
A representation of a specific entity to store in the annotation graph.
const Automaton::EntityFeatures & getFeatures() const
AnnotationGraph::vertex_descriptor AnnotationGraphVertex
bool hasAnnotation(AnnotationGraphVertex v, const LimaString &annot) const
LimaString utf8stdstring2limastring(const std::string &src)
std::multimap< std::string, EventTemplateElement > TemplateElements