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

This action constraint modifies the type of relations previously found by FindRelationFrom. More...

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

Inheritance diagram for Lima::LinguisticProcessing::SyntacticAnalysis::ModifyRelationInGraph:
Lima::LinguisticProcessing::SyntacticAnalysis::ConstraintWithRelationComplement Lima::LinguisticProcessing::Automaton::ConstraintFunction

Public Member Functions

 ModifyRelationInGraph (MediaId language, const LimaString &complement=LimaString())
 
 ~ModifyRelationInGraph ()
 
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).
 
bool operator() (AnalysisContent &analysis) const override
 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)
 
- Public Member Functions inherited from Lima::LinguisticProcessing::SyntacticAnalysis::ConstraintWithRelationComplement
 ConstraintWithRelationComplement (MediaId language, const LimaString &complement=LimaString())
 
 ~ConstraintWithRelationComplement ()
 
- 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() (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 ()
 

Additional Inherited Members

- Protected Member Functions inherited from Lima::LinguisticProcessing::Automaton::ConstraintFunction
 ConstraintFunction (MediaId language, const LimaString &complement=LimaString())
 
- Protected Attributes inherited from Lima::LinguisticProcessing::SyntacticAnalysis::ConstraintWithRelationComplement
Common::MediaticData::SyntacticRelationId m_relation
 
- Protected Attributes inherited from Lima::LinguisticProcessing::Automaton::ConstraintFunction
MediaId m_language_id
 
LimaString m_complement
 

Detailed Description

This action constraint modifies the type of relations previously found by FindRelationFrom.

The new type is given by the complement.

This class is used during the specializing of relations like CPL_V into circumpstantials like CC_TEMPS.

Definition at line 450 of file HomoSyntagmaticConstraints.h.

Constructor & Destructor Documentation

◆ ModifyRelationInGraph()

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

Definition at line 1479 of file HomoSyntagmaticConstraints.cpp.

◆ ~ModifyRelationInGraph()

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

Definition at line 455 of file HomoSyntagmaticConstraints.h.

Member Function Documentation

◆ operator()() [1/2]

bool Lima::LinguisticProcessing::SyntacticAnalysis::ModifyRelationInGraph::operator() ( AnalysisContent &  ) const
overridevirtual

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)

Returns
true if the action of the function succeeded, false otherwise

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

Definition at line 1494 of file HomoSyntagmaticConstraints.cpp.

◆ operator()() [2/2]

bool Lima::LinguisticProcessing::SyntacticAnalysis::ModifyRelationInGraph::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 1484 of file HomoSyntagmaticConstraints.cpp.


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