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

This constraint tests if its argument is the governor of a relation of the given type. More...

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

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

Public Member Functions

 GovernorOf (MediaId language, const LimaString &complement=LimaString())
 
 ~GovernorOf ()
 
bool operator() (const LinguisticAnalysisStructure::AnalysisGraph &graph, const LinguisticGraphVertex &v1, AnalysisContent &analysis) const override
 unary constraint function : the constraint only applies on one vertices in the graph (the graph is also given as a parameter).
 
- 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 &, const LinguisticGraphVertex &, AnalysisContent &) const
 binary constraint function : the constraint only applies on two 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 ()
 

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 constraint tests if its argument is the governor of a relation of the given type.

So , if there is a relation a-(X)->b in the graph, GovernorOf(a,X) will return true and false otherwise.

Definition at line 97 of file HomoSyntagmaticConstraints.h.

Constructor & Destructor Documentation

◆ GovernorOf()

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

Definition at line 193 of file HomoSyntagmaticConstraints.cpp.

◆ ~GovernorOf()

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

Definition at line 102 of file HomoSyntagmaticConstraints.h.

Member Function Documentation

◆ operator()()

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

unary constraint function : the constraint only applies on one 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 200 of file HomoSyntagmaticConstraints.cpp.


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