15#ifndef LIMA_ANNOTATIONGRAPHS_ANNOTATIONDATA_H
16#define LIMA_ANNOTATIONGRAPHS_ANNOTATIONDATA_H
224 const std::string& second)
const;
241 const StringsPoolIndex& second)
const;
257 std::set< AnnotationGraphVertex >
matches(
const StringsPoolIndex& direction,
269 std::set< std::string >& excepted);
272 const std::map<StringsPoolIndex, std::multimap<AnnotationGraphVertex, AnnotationGraphVertex> >&
matchings()
const;
A graph that stores any data (annotations) referencing primarily nodes of a text anlaysis.
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AGVertexProperties, AGEdgeProperties > AnnotationGraph
The graph class.
#define LIMA_ANNOTATIONGRAPH_EXPORT
just for semantics: base class for analysisData
virtual int dump(std::ostream &, GenericAnnotation &) const =0
AnnotationData()
Default constructor.
void addMatching(const std::string &first, AnnotationGraphVertex firstVx, const std::string &second, AnnotationGraphVertex secondVx)
Adds a symetric matching between two vertices of two graphs identified by the two string parameters.
uint64_t intAnnotation(AnnotationGraphVertex v1, AnnotationGraphVertex v2, const LimaString &annot) const
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 std::map< StringsPoolIndex, std::multimap< AnnotationGraphVertex, AnnotationGraphVertex > > & matchings() const
Access to the underlying raw matching structure.
const GenericAnnotation & annotation(AnnotationGraphVertex v1, AnnotationGraphVertex v2, const LimaString &annot) const
const LimaString & stringAnnotation(AnnotationGraphVertex v1, AnnotationGraphVertex v2, const LimaString &annot) const
AnnotationGraphVertex createAnnotationVertex()
Creates a new annotation vertex in the graph.
void cloneAnnotations(AnnotationGraphVertex src, AnnotationGraphVertex tgt, std::set< std::string > &excepted)
@briefs copies all the annotations of the source annotation vertex onto the target annotation vertex,...
uint64_t annotationId(const LimaString &s)
Gives the id of an annotation name.
bool isMatching(const std::string &first, AnnotationGraphVertex firstVx, const std::string &second, AnnotationGraphVertex secondVx) const
Tests if the two given vertices are matching in the two given graphs.
AnnotationGraphEdge createAnnotationEdge(AnnotationGraphVertex s, AnnotationGraphVertex t)
Creates a new annotation edge in the graph.
const LimaString & annotationName(uint64_t annotationId) const
Gives the name of an annotation id.
This class allows to convert any object into an annotation by inheritance.
AnnotationGraph & getGraph()
void dumpFunction(const std::string &annot, const Dumper *f)
AnnotationGraph::edge_descriptor AnnotationGraphEdge
AnnotationGraph::vertex_descriptor AnnotationGraphVertex
uint64_t intAnnotation(AnnotationGraphEdge e, uint64_t annot) const
const LimaString & stringAnnotation(AnnotationGraphEdge e, uint64_t annot) const
bool hasStringAnnotation(AnnotationGraphVertex v, const LimaString &annot) const
bool hasIntAnnotation(AnnotationGraphVertex v, const LimaString &annot) const
bool hasAnnotation(AnnotationGraphVertex v, const LimaString &annot) const
void annotate(AnnotationGraphVertex v, const LimaString &annot, uint64_t value)