LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::Common::AnnotationGraphs::AnnotationData Class Reference

Holds an annotation graph and gives an API to manipulate it. More...

#include <linguisticProcessing/common/annotationGraph/AnnotationData.h>

Inheritance diagram for Lima::Common::AnnotationGraphs::AnnotationData:
Lima::AnalysisData

Classes

class  Dumper
 

Public Member Functions

 AnnotationData ()
 Default constructor.
 
virtual ~AnnotationData ()
 Default destructor.
 
AnnotationGraphVertex createAnnotationVertex ()
 Creates a new annotation vertex in the graph.
 
AnnotationGraphEdge createAnnotationEdge (AnnotationGraphVertex s, AnnotationGraphVertex t)
 Creates a new annotation edge in the graph.
 
void annotate (AnnotationGraphVertex v, const LimaString &annot, uint64_t value)
 
void annotate (AnnotationGraphVertex v, const LimaString &annot, const LimaString &value)
 
void annotate (AnnotationGraphVertex v, const LimaString &annot, const GenericAnnotation &value)
 
void annotate (AnnotationGraphVertex vs, AnnotationGraphVertex vt, const LimaString &annot, uint64_t value)
 
void annotate (AnnotationGraphVertex vs, AnnotationGraphVertex vt, const LimaString &annot, const LimaString &value)
 
void annotate (AnnotationGraphVertex vs, AnnotationGraphVertex vt, const LimaString &annot, const GenericAnnotation &value)
 
void annotate (AnnotationGraphEdge e, const LimaString &annot, uint64_t value)
 
void annotate (AnnotationGraphEdge e, const LimaString &annot, const LimaString &value)
 
void annotate (AnnotationGraphEdge e, const LimaString &annot, const GenericAnnotation &value)
 
uint64_t intAnnotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, const LimaString &annot) const
 
const LimaString & stringAnnotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, const LimaString &annot) const
 
const GenericAnnotation & annotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, const LimaString &annot) const
 
GenericAnnotation & annotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, const LimaString &annot)
 
uint64_t intAnnotation (AnnotationGraphVertex v, const LimaString &annot) const
 
const LimaString & stringAnnotation (AnnotationGraphVertex v, const LimaString &annot) const
 
const GenericAnnotation & annotation (AnnotationGraphVertex v, const LimaString &annot) const
 
GenericAnnotation & annotation (AnnotationGraphVertex v, const LimaString &annot)
 
uint64_t intAnnotation (AnnotationGraphEdge e, const LimaString &annot)
 
const LimaString & stringAnnotation (AnnotationGraphEdge e, const LimaString &annot)
 
const GenericAnnotation & annotation (AnnotationGraphEdge e, const LimaString &annot) const
 
GenericAnnotation & annotation (AnnotationGraphEdge e, const LimaString &annot)
 
void annotate (AnnotationGraphVertex v, uint64_t annot, uint64_t value)
 for annotation by feature id, the id have to already exist with a name
 
void annotate (AnnotationGraphVertex v, uint64_t annot, const LimaString &value)
 
void annotate (AnnotationGraphVertex v, uint64_t annot, const GenericAnnotation &value)
 
void annotate (AnnotationGraphVertex vs, AnnotationGraphVertex vt, uint64_t annot, uint64_t value)
 
void annotate (AnnotationGraphVertex vs, AnnotationGraphVertex vt, uint64_t annot, const LimaString &value)
 
void annotate (AnnotationGraphVertex vs, AnnotationGraphVertex vt, uint64_t annot, const GenericAnnotation &value)
 
void annotate (AnnotationGraphEdge e, uint64_t annot, uint64_t value)
 
void annotate (AnnotationGraphEdge e, uint64_t annot, const LimaString &value)
 
void annotate (AnnotationGraphEdge e, uint64_t annot, const GenericAnnotation &value)
 
uint64_t intAnnotation (AnnotationGraphVertex v, uint64_t annot) const
 
const LimaString & stringAnnotation (AnnotationGraphVertex v, uint64_t annot) const
 
const GenericAnnotation & annotation (AnnotationGraphVertex v, uint64_t annot) const
 
GenericAnnotation & annotation (AnnotationGraphVertex v, uint64_t annot)
 
uint64_t intAnnotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, uint64_t annot) const
 
const LimaString & stringAnnotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, uint64_t annot) const
 
const GenericAnnotation & annotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, uint64_t annot) const
 
GenericAnnotation & annotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, uint64_t annot)
 
uint64_t intAnnotation (AnnotationGraphEdge e, uint64_t annot)
 
LimaString & stringAnnotation (AnnotationGraphEdge e, uint64_t annot)
 
GenericAnnotation & annotation (AnnotationGraphEdge e, uint64_t annot)
 
uint64_t intAnnotation (AnnotationGraphEdge e, uint64_t annot) const
 
const LimaString & stringAnnotation (AnnotationGraphEdge e, uint64_t annot) const
 
const GenericAnnotation & annotation (AnnotationGraphEdge e, uint64_t annot) const
 
bool hasIntAnnotation (AnnotationGraphVertex v, const LimaString &annot) const
 
bool hasStringAnnotation (AnnotationGraphVertex v, const LimaString &annot) const
 
bool hasAnnotation (AnnotationGraphVertex v, const LimaString &annot) const
 
bool hasIntAnnotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, const LimaString &annot) const
 
bool hasStringAnnotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, const LimaString &annot) const
 
bool hasAnnotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, const LimaString &annot) const
 
bool hasIntAnnotation (AnnotationGraphEdge e, const LimaString &annot) const
 
bool hasStringAnnotation (AnnotationGraphEdge e, const LimaString &annot) const
 
bool hasAnnotation (AnnotationGraphEdge e, const LimaString &annot) const
 
bool hasIntAnnotation (AnnotationGraphVertex v, uint64_t annot) const
 
bool hasStringAnnotation (AnnotationGraphVertex v, uint64_t annot) const
 
bool hasAnnotation (AnnotationGraphVertex v, uint64_t annot) const
 
bool hasIntAnnotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, uint64_t annot) const
 
bool hasStringAnnotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, uint64_t annot) const
 
bool hasAnnotation (AnnotationGraphVertex v1, AnnotationGraphVertex v2, uint64_t annot) const
 
bool hasIntAnnotation (AnnotationGraphEdge e, uint64_t annot) const
 
bool hasStringAnnotation (AnnotationGraphEdge e, uint64_t annot) const
 
bool hasAnnotation (AnnotationGraphEdge e, uint64_t annot) const
 
AnnotationGraph & getGraph ()
 
const AnnotationGraph & getGraph () const
 
const LimaString & annotationName (uint64_t annotationId) const
 Gives the name of an annotation id.
 
uint64_t annotationId (const LimaString &s)
 Gives the id of an annotation name.
 
void dumpFunction (const std::string &annot, const Dumper *f)
 
const Dumper * dumpFunction (const std::string &annot)
 
const Dumper * dumpFunction (uint64_t annot)
 
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.
 
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.
 
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.
 
void addMatching (const StringsPoolIndex &first, AnnotationGraphVertex firstVx, const StringsPoolIndex &second, AnnotationGraphVertex secondVx)
 Adds a symetric matching between two vertices of two graphs identified by the two string parameters.
 
std::set< AnnotationGraphVertex > matches (const StringsPoolIndex &first, AnnotationGraphVertex firstVx, const StringsPoolIndex &second) const
 Gets the set of vertices matched in the second graph by the given vertex of the first graph.
 
bool isMatching (const StringsPoolIndex &first, AnnotationGraphVertex firstVx, const StringsPoolIndex &second, AnnotationGraphVertex secondVx) const
 Tests if the two given vertices are matching in the two given graphs.
 
void addMatching (const StringsPoolIndex &direction, AnnotationGraphVertex firstVx, AnnotationGraphVertex secondVx)
 Adds a symetric matching between two vertices of two graphs identified by the two string parameters.
 
std::set< AnnotationGraphVertex > matches (const StringsPoolIndex &direction, AnnotationGraphVertex firstVx) const
 Gets the set of vertices matched in the second graph by the given vertex of the first graph.
 
bool isMatching (const StringsPoolIndex &direction, AnnotationGraphVertex firstVx, AnnotationGraphVertex secondVx) const
 Tests if the two given vertices are matching in the two given graphs.
 
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, except those listed
 
const std::map< StringsPoolIndex, std::multimap< AnnotationGraphVertex, AnnotationGraphVertex > > & matchings () const
 Access to the underlying raw matching structure.
 
- Public Member Functions inherited from Lima::AnalysisData
virtual ~AnalysisData ()
 

Detailed Description

Holds an annotation graph and gives an API to manipulate it.

Author
Gael de Chalendar Gael..nosp@m.de-C.nosp@m.halen.nosp@m.dar@.nosp@m.cea.f.nosp@m.r

Definition at line 34 of file AnnotationData.h.

Constructor & Destructor Documentation

◆ AnnotationData()

Lima::Common::AnnotationGraphs::AnnotationData::AnnotationData ( )

Default constructor.

Definition at line 125 of file AnnotationData.cpp.

◆ ~AnnotationData()

Lima::Common::AnnotationGraphs::AnnotationData::~AnnotationData ( )
virtual

Default destructor.

Definition at line 130 of file AnnotationData.cpp.

Member Function Documentation

◆ addMatching() [1/3]

void Lima::Common::AnnotationGraphs::AnnotationData::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.

Definition at line 687 of file AnnotationData.cpp.

◆ addMatching() [2/3]

void Lima::Common::AnnotationGraphs::AnnotationData::addMatching ( const StringsPoolIndex &  direction,
AnnotationGraphVertex  firstVx,
AnnotationGraphVertex  secondVx 
)

Adds a symetric matching between two vertices of two graphs identified by the two string parameters.

Definition at line 677 of file AnnotationData.cpp.

◆ addMatching() [3/3]

void Lima::Common::AnnotationGraphs::AnnotationData::addMatching ( const StringsPoolIndex &  first,
AnnotationGraphVertex  firstVx,
const StringsPoolIndex &  second,
AnnotationGraphVertex  secondVx 
)

Adds a symetric matching between two vertices of two graphs identified by the two string parameters.

Definition at line 722 of file AnnotationData.cpp.

◆ annotation() [1/2]

GenericAnnotation & Lima::Common::AnnotationGraphs::AnnotationData::annotation ( AnnotationGraphVertex  v1,
AnnotationGraphVertex  v2,
const LimaString &  annot 
)

Definition at line 285 of file AnnotationData.cpp.

◆ annotation() [2/2]

const GenericAnnotation & Lima::Common::AnnotationGraphs::AnnotationData::annotation ( AnnotationGraphVertex  v1,
AnnotationGraphVertex  v2,
const LimaString &  annot 
) const

Definition at line 280 of file AnnotationData.cpp.

◆ annotationId()

uint64_t Lima::Common::AnnotationGraphs::AnnotationData::annotationId ( const LimaString &  s)

Gives the id of an annotation name.

Definition at line 146 of file AnnotationData.cpp.

◆ annotationName()

const LimaString & Lima::Common::AnnotationGraphs::AnnotationData::annotationName ( uint64_t  annotationId) const

Gives the name of an annotation id.

Definition at line 140 of file AnnotationData.cpp.

◆ cloneAnnotations()

void Lima::Common::AnnotationGraphs::AnnotationData::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, except those listed

Definition at line 785 of file AnnotationData.cpp.

◆ createAnnotationEdge()

AnnotationGraphEdge Lima::Common::AnnotationGraphs::AnnotationData::createAnnotationEdge ( AnnotationGraphVertex  s,
AnnotationGraphVertex  t 
)

Creates a new annotation edge in the graph.

Definition at line 157 of file AnnotationData.cpp.

◆ createAnnotationVertex()

AnnotationGraphVertex Lima::Common::AnnotationGraphs::AnnotationData::createAnnotationVertex ( )

Creates a new annotation vertex in the graph.

Definition at line 152 of file AnnotationData.cpp.

◆ intAnnotation()

uint64_t Lima::Common::AnnotationGraphs::AnnotationData::intAnnotation ( AnnotationGraphVertex  v1,
AnnotationGraphVertex  v2,
const LimaString &  annot 
) const

Definition at line 269 of file AnnotationData.cpp.

◆ isMatching() [1/3]

bool Lima::Common::AnnotationGraphs::AnnotationData::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.

Definition at line 716 of file AnnotationData.cpp.

◆ isMatching() [2/3]

bool Lima::Common::AnnotationGraphs::AnnotationData::isMatching ( const StringsPoolIndex &  direction,
AnnotationGraphVertex  firstVx,
AnnotationGraphVertex  secondVx 
) const

Tests if the two given vertices are matching in the two given graphs.

Definition at line 761 of file AnnotationData.cpp.

◆ isMatching() [3/3]

bool Lima::Common::AnnotationGraphs::AnnotationData::isMatching ( const StringsPoolIndex &  first,
AnnotationGraphVertex  firstVx,
const StringsPoolIndex &  second,
AnnotationGraphVertex  secondVx 
) const

Tests if the two given vertices are matching in the two given graphs.

Definition at line 736 of file AnnotationData.cpp.

◆ matches() [1/3]

std::set< AnnotationGraphVertex > Lima::Common::AnnotationGraphs::AnnotationData::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.

Definition at line 707 of file AnnotationData.cpp.

◆ matches() [2/3]

std::set< AnnotationGraphVertex > Lima::Common::AnnotationGraphs::AnnotationData::matches ( const StringsPoolIndex &  direction,
AnnotationGraphVertex  firstVx 
) const

Gets the set of vertices matched in the second graph by the given vertex of the first graph.

Definition at line 742 of file AnnotationData.cpp.

◆ matches() [3/3]

std::set< AnnotationGraphVertex > Lima::Common::AnnotationGraphs::AnnotationData::matches ( const StringsPoolIndex &  first,
AnnotationGraphVertex  firstVx,
const StringsPoolIndex &  second 
) const

Gets the set of vertices matched in the second graph by the given vertex of the first graph.

Definition at line 729 of file AnnotationData.cpp.

◆ matchings()

const std::map< StringsPoolIndex, std::multimap< AnnotationGraphVertex, AnnotationGraphVertex > > & Lima::Common::AnnotationGraphs::AnnotationData::matchings ( ) const

Access to the underlying raw matching structure.

Definition at line 684 of file AnnotationData.cpp.

◆ stringAnnotation()

const LimaString & Lima::Common::AnnotationGraphs::AnnotationData::stringAnnotation ( AnnotationGraphVertex  v1,
AnnotationGraphVertex  v2,
const LimaString &  annot 
) const

Definition at line 275 of file AnnotationData.cpp.


The documentation for this class was generated from the following files: