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

#include <linguisticProcessing/core/MorphologicAnalysis/IdiomaticAlternativesConstraints.h>

Inheritance diagram for Lima::LinguisticProcessing::MorphologicAnalysis::CreateIdiomaticAlternative:
Lima::LinguisticProcessing::ApplyRecognizer::CreateAlternative Lima::LinguisticProcessing::Automaton::ConstraintFunction

Public Member Functions

 CreateIdiomaticAlternative (MediaId language, const LimaString &complement=LimaString())
virtual ~CreateIdiomaticAlternative ()
virtual bool operator() (Automaton::RecognizerMatch &match, 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: uses the result of the match
Public Member Functions inherited from Lima::LinguisticProcessing::ApplyRecognizer::CreateAlternative
 CreateAlternative (MediaId language, const LimaString &complement=LimaString())
virtual ~CreateAlternative ()
bool actionNeedsRecognizedExpression () override
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() (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)
const LimaString & getComplementString ()
unsigned char getLanguage ()

Additional Inherited Members

Protected Member Functions inherited from Lima::LinguisticProcessing::ApplyRecognizer::CreateAlternative
std::pair< LinguisticAnalysisStructure::Token *, LinguisticAnalysisStructure::MorphoSyntacticData * > createAlternativeToken (const Automaton::RecognizerMatch &recognizedExpression) const
 Creates the new token corresponding to the idiomatic expression using information from the expression and from the head token of the expression.
bool getCompatibleProperties (const LinguisticAnalysisStructure::MorphoSyntacticData *headData, const LinguisticCode &baseProperty, std::set< LinguisticCode > &newProperties) const
bool isCompatible (const LinguisticCode &baseProperty, const LinguisticCode &property, LinguisticCode &newProperty) const
LinguisticGraphVertex addAlternativeVertex (LinguisticAnalysisStructure::Token *, LinguisticAnalysisStructure::MorphoSyntacticData *, LinguisticGraph *graph) const
void createBeginAlternative (LinguisticGraphVertex startVertex, LinguisticGraphVertex alternativeFirstVertex, LinguisticGraph &graph) const
 create an alternative branch
void attachEndOfAlternative (LinguisticGraphVertex alternativeLastVertex, LinguisticGraphVertex endVertex, LinguisticGraph &graph) const
 attach the end of an alternative to main path
Protected Member Functions inherited from Lima::LinguisticProcessing::Automaton::ConstraintFunction
 ConstraintFunction (MediaId language, const LimaString &complement=LimaString())
Protected Attributes inherited from Lima::LinguisticProcessing::Automaton::ConstraintFunction
MediaId m_language_id
LimaString m_complement

Detailed Description

Definition at line 25 of file IdiomaticAlternativesConstraints.h.

Constructor & Destructor Documentation

◆ CreateIdiomaticAlternative()

Lima::LinguisticProcessing::MorphologicAnalysis::CreateIdiomaticAlternative::CreateIdiomaticAlternative ( MediaId language,
const LimaString & complement = LimaString() )

Definition at line 44 of file IdiomaticAlternativesConstraints.cpp.

◆ ~CreateIdiomaticAlternative()

virtual Lima::LinguisticProcessing::MorphologicAnalysis::CreateIdiomaticAlternative::~CreateIdiomaticAlternative ( )
inlinevirtual

Definition at line 30 of file IdiomaticAlternativesConstraints.h.

Member Function Documentation

◆ operator()()

bool Lima::LinguisticProcessing::MorphologicAnalysis::CreateIdiomaticAlternative::operator() ( Automaton::RecognizerMatch & ,
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: uses the result of the match

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

Reimplemented from Lima::LinguisticProcessing::ApplyRecognizer::CreateAlternative.

Definition at line 135 of file IdiomaticAlternativesConstraints.cpp.


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