LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::LinguisticProcessing::SyntacticAnalysis::CreateRelationWithRelated Class Reference

This constraint add in the relations buffer the relations of the given type from v1 to the targets of relations out of v2 of the given types. More...

#include <linguisticProcessing/core/SyntacticAnalysis/HomoSyntagmaticConstraints.h>

Inheritance diagram for Lima::LinguisticProcessing::SyntacticAnalysis::CreateRelationWithRelated:
Lima::LinguisticProcessing::Automaton::ConstraintFunction Lima::LinguisticProcessing::SyntacticAnalysis::CreateRelationReverseWithRelated

Public Member Functions

 CreateRelationWithRelated (MediaId language, const LimaString &complement=LimaString())
 
 ~CreateRelationWithRelated ()
 
bool operator() (const LinguisticAnalysisStructure::AnalysisGraph &graph, const LinguisticGraphVertex &v1, const LinguisticGraphVertex &v2, AnalysisContent &analysis) const override
 binary constraint function : the constraint only applies on two vertices in the graph (the graph is also given as a parameter).
 
- Public Member Functions inherited from Lima::LinguisticProcessing::Automaton::ConstraintFunction
virtual ~ConstraintFunction ()
 
virtual bool operator() (const LinguisticAnalysisStructure::AnalysisGraph &, const LinguisticGraphVertex &, AnalysisContent &) const
 unary constraint function : the constraint only applies on one vertices in the graph (the graph is also given as a parameter).
 
virtual bool operator() (AnalysisContent &) const
 zero-ary constraint function : applies the function without a vertex indication (used for actions, not constraints -> applied only at end, when a match is found)
 
virtual bool operator() (RecognizerMatch &, AnalysisContent &) const
 zero-ary constraint function : applies the function without a vertex indication (used for actions, not constraints -> applied only at end, when a match is found: uses the result of the match
 
virtual bool actionNeedsRecognizedExpression ()
 
const LimaString & getComplementString ()
 
unsigned char getLanguage ()
 

Protected Member Functions

std::vector< LinguisticGraphVertex > findRelatedVertices (const LinguisticGraphVertex &v, SyntacticData *syntacticData) const
 
- Protected Member Functions inherited from Lima::LinguisticProcessing::Automaton::ConstraintFunction
 ConstraintFunction (MediaId language, const LimaString &complement=LimaString())
 

Protected Attributes

std::set< Common::MediaticData::SyntacticRelationId > m_relationsToFollow
 
Common::MediaticData::SyntacticRelationId m_relationToCreate
 
- Protected Attributes inherited from Lima::LinguisticProcessing::Automaton::ConstraintFunction
MediaId m_language_id
 
LimaString m_complement
 

Detailed Description

This constraint add in the relations buffer the relations of the given type from v1 to the targets of relations out of v2 of the given types.

The complement must be of the form: "rel2|…|reln,rel1" with rel1 the type of the relation to create and rel2, …, reln the types of the relations to follow.

Relations added to the buffer will be really added later on succes of the rule by the action constraint AddRelationInGraph

Definition at line 202 of file HomoSyntagmaticConstraints.h.

Constructor & Destructor Documentation

◆ CreateRelationWithRelated()

Lima::LinguisticProcessing::SyntacticAnalysis::CreateRelationWithRelated::CreateRelationWithRelated ( MediaId  language,
const LimaString &  complement = LimaString() 
)
explicit

Definition at line 601 of file HomoSyntagmaticConstraints.cpp.

◆ ~CreateRelationWithRelated()

Lima::LinguisticProcessing::SyntacticAnalysis::CreateRelationWithRelated::~CreateRelationWithRelated ( )
inline

Definition at line 207 of file HomoSyntagmaticConstraints.h.

Member Function Documentation

◆ findRelatedVertices()

std::vector< LinguisticGraphVertex > Lima::LinguisticProcessing::SyntacticAnalysis::CreateRelationWithRelated::findRelatedVertices ( const LinguisticGraphVertex &  v,
SyntacticData *  syntacticData 
) const
protected

Definition at line 638 of file HomoSyntagmaticConstraints.cpp.

◆ operator()()

bool Lima::LinguisticProcessing::SyntacticAnalysis::CreateRelationWithRelated::operator() ( const LinguisticAnalysisStructure::AnalysisGraph &  ,
const LinguisticGraphVertex &  ,
const LinguisticGraphVertex &  ,
AnalysisContent &   
) const
overridevirtual

binary constraint function : the constraint only applies on two vertices in the graph (the graph is also given as a parameter).

Function is not pure virtual because it can be unary or binary.

Returns
true if the constraint is verified, false otherwise

Reimplemented from Lima::LinguisticProcessing::Automaton::ConstraintFunction.

Definition at line 667 of file HomoSyntagmaticConstraints.cpp.

Member Data Documentation

◆ m_relationsToFollow

std::set<Common::MediaticData::SyntacticRelationId> Lima::LinguisticProcessing::SyntacticAnalysis::CreateRelationWithRelated::m_relationsToFollow
protected

Definition at line 214 of file HomoSyntagmaticConstraints.h.

◆ m_relationToCreate

Common::MediaticData::SyntacticRelationId Lima::LinguisticProcessing::SyntacticAnalysis::CreateRelationWithRelated::m_relationToCreate
protected

Definition at line 215 of file HomoSyntagmaticConstraints.h.


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