![]() |
LIMA
Libre Multilingual Analyzer — C++ API
|
This class points to a graph, its dependency graph and the structure that holds the maping between the nodes of both graphs. More...
#include <linguisticProcessing/core/SyntacticAnalysis/SyntacticData.h>
Public Types | |
| typedef std::tuple< LinguisticGraphVertex, LinguisticGraphVertex, Common::MediaticData::SyntacticRelationId > | Relation |
Public Member Functions | |
| SyntacticData (LinguisticAnalysisStructure::AnalysisGraph *pit, std::shared_ptr< SyntagmDefStruct > matrices) | |
| This constructor uses the given graph to construct a dependency graph with the same number of vertices and it fills the mapping between them. | |
| virtual | ~SyntacticData () |
| LinguisticGraph * | graph () |
| const LinguisticGraph * | graph () const |
| DependencyGraph * | dependencyGraph () |
| const DependencyGraph * | dependencyGraph () const |
| LinguisticAnalysisStructure::AnalysisGraph * | iterator () |
| const LinguisticAnalysisStructure::AnalysisGraph * | iterator () const |
| std::shared_ptr< SyntagmDefStruct > | matrices () const |
| void | matrices (std::shared_ptr< SyntagmDefStruct > matrices) |
| std::vector< LinguisticAnalysisStructure::Token * > & | ownedTokens () |
| std::vector< LinguisticAnalysisStructure::MorphoSyntacticData * > & | ownedMorphosyntacticData () |
| DependencyGraphVertex | depVertexForTokenVertex (const LinguisticGraphVertex &v) const |
| LinguisticGraphVertex | tokenVertexForDepVertex (const DependencyGraphVertex &v) const |
| uint64_t | depsBetween (const LinguisticGraphVertex &srcVertex, const LinguisticGraphVertex &tgtVertex) |
| Computes the number of dependency relations in the graph between the given source and taget morphosyntactic vertices. | |
| void | setupDependencyGraph () |
| This method is used to setup the search of the dependency relations when the PoS tagging is done and thus the number of vertices will not change anymore in the morphosyntactic graph. | |
| std::vector< LinguisticGraphVertex > | findRelated (const LinguisticGraphVertex, const Common::MediaticData::SyntacticRelationId &relation) |
| find vertices related to a given vertex by a given relation (related vertices can be either source or target of the relation) | |
| std::vector< LinguisticGraphVertex > | findRelated (const LinguisticGraphVertex, const std::set< Common::MediaticData::SyntacticRelationId > &relations) |
| find vertices related to a given vertex a a relation that belongs to a given set of relations (related vertices can be either source or target of the relation) | |
| void | clearStoredRelations () |
| Relation | relation () |
| bool | relation (const LinguisticGraphVertex &v1, const LinguisticGraphVertex &v2, const Common::MediaticData::SyntacticRelationId relationType=0) |
| std::pair< LinguisticGraphVertex, DependencyGraphVertex > | addVertex () |
| This method is used to setup the search of the dependency relations when the PoS tagging is done and thus the number of vertices will not change anymore in the morphosyntactic graph. | |
| void | addRelationNoChain (const Common::MediaticData::SyntacticRelationId &relType, const LinguisticGraphVertex &src, const LinguisticGraphVertex &dest) |
| void | modifyRelationNoChain (const Common::MediaticData::SyntacticRelationId &relType, const LinguisticGraphVertex &src, const LinguisticGraphVertex &dest, const Common::MediaticData::SyntacticRelationId &newType) |
| bool | storeRelationForSelectionalConstraint (const LinguisticGraphVertex &v1, const LinguisticGraphVertex &v2, const Common::MediaticData::SyntacticRelationId relationType=0) |
| Relation | relationStoredForSelectionalConstraint () |
| bool | removeDependency (const LinguisticGraphVertex &v1, const LinguisticGraphVertex &v2, const Common::MediaticData::SyntacticRelationId relationType=0) |
Public Member Functions inherited from Lima::AnalysisData | |
| virtual | ~AnalysisData () |
This class points to a graph, its dependency graph and the structure that holds the maping between the nodes of both graphs.
Definition at line 50 of file SyntacticData.h.
| typedef std::tuple< LinguisticGraphVertex, LinguisticGraphVertex, Common::MediaticData::SyntacticRelationId > Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticData::Relation |
Definition at line 53 of file SyntacticData.h.
| Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticData::SyntacticData | ( | LinguisticAnalysisStructure::AnalysisGraph * | pit, |
| std::shared_ptr< SyntagmDefStruct > | matrices | ||
| ) |
This constructor uses the given graph to construct a dependency graph with the same number of vertices and it fills the mapping between them.
| graph | IN/OUT LinguisticGraph* the graph containing morphological data |
Definition at line 29 of file SyntacticData.cpp.
|
virtual |
Definition at line 46 of file SyntacticData.cpp.
| void Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticData::addRelationNoChain | ( | const Common::MediaticData::SyntacticRelationId & | relType, |
| const LinguisticGraphVertex & | src, | ||
| const LinguisticGraphVertex & | dest | ||
| ) |
Definition at line 231 of file SyntacticData.cpp.
| std::pair< LinguisticGraphVertex, DependencyGraphVertex > Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticData::addVertex | ( | ) |
This method is used to setup the search of the dependency relations when the PoS tagging is done and thus the number of vertices will not change anymore in the morphosyntactic graph.
It creates a dependency graph with the same number of nodes than in the morphosyntactic graph and a mapping expressing the bijection between the nodes of both graphs.
Definition at line 106 of file SyntacticData.cpp.
|
inline |
Definition at line 127 of file SyntacticData.h.
|
inline |
Definition at line 68 of file SyntacticData.h.
|
inline |
Definition at line 69 of file SyntacticData.h.
| uint64_t Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticData::depsBetween | ( | const LinguisticGraphVertex & | srcVertex, |
| const LinguisticGraphVertex & | tgtVertex | ||
| ) |
Computes the number of dependency relations in the graph between the given source and taget morphosyntactic vertices.
Computes the number of dependency relations in the graph between the given source and target morphosyntactic vertices.
Definition at line 144 of file SyntacticData.cpp.
| DependencyGraphVertex Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticData::depVertexForTokenVertex | ( | const LinguisticGraphVertex & | v | ) | const |
Definition at line 119 of file SyntacticData.cpp.
| std::vector< LinguisticGraphVertex > Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticData::findRelated | ( | const LinguisticGraphVertex | v, |
| const Common::MediaticData::SyntacticRelationId & | relation | ||
| ) |
find vertices related to a given vertex by a given relation (related vertices can be either source or target of the relation)
| LinguisticGraphVertex | the given vertex |
| relation | the type of relation to look for |
Definition at line 174 of file SyntacticData.cpp.
| std::vector< LinguisticGraphVertex > Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticData::findRelated | ( | const LinguisticGraphVertex | v, |
| const std::set< Common::MediaticData::SyntacticRelationId > & | relations | ||
| ) |
find vertices related to a given vertex a a relation that belongs to a given set of relations (related vertices can be either source or target of the relation)
| LinguisticGraphVertex | the given vertex |
| relation | the set of relations to look for |
Definition at line 202 of file SyntacticData.cpp.
|
inline |
Definition at line 65 of file SyntacticData.h.
|
inline |
Definition at line 66 of file SyntacticData.h.
|
inline |
Definition at line 71 of file SyntacticData.h.
|
inline |
Definition at line 72 of file SyntacticData.h.
|
inline |
Definition at line 74 of file SyntacticData.h.
|
inline |
Definition at line 75 of file SyntacticData.h.
| void Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticData::modifyRelationNoChain | ( | const Common::MediaticData::SyntacticRelationId & | relType, |
| const LinguisticGraphVertex & | src, | ||
| const LinguisticGraphVertex & | dest, | ||
| const Common::MediaticData::SyntacticRelationId & | newType | ||
| ) |
Definition at line 265 of file SyntacticData.cpp.
|
inline |
Definition at line 78 of file SyntacticData.h.
|
inline |
Definition at line 77 of file SyntacticData.h.
|
inline |
Definition at line 129 of file SyntacticData.h.
|
inline |
Definition at line 142 of file SyntacticData.h.
|
inline |
Definition at line 178 of file SyntacticData.h.
| bool Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticData::removeDependency | ( | const LinguisticGraphVertex & | v1, |
| const LinguisticGraphVertex & | v2, | ||
| const Common::MediaticData::SyntacticRelationId | relationType = 0 |
||
| ) |
Definition at line 297 of file SyntacticData.cpp.
| void Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticData::setupDependencyGraph | ( | ) |
This method is used to setup the search of the dependency relations when the PoS tagging is done and thus the number of vertices will not change anymore in the morphosyntactic graph.
It creates a dependency graph with the same number of nodes than in the morphosyntactic graph and a mapping expressing the bijection between the nodes of both graphs.
Definition at line 74 of file SyntacticData.cpp.
|
inline |
Definition at line 170 of file SyntacticData.h.
| LinguisticGraphVertex Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticData::tokenVertexForDepVertex | ( | const DependencyGraphVertex & | v | ) | const |
Definition at line 130 of file SyntacticData.cpp.