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

This action set the value of a feature for an entity during the recognition of the entity (i.e. More...

#include <linguisticProcessing/core/SpecificEntities/SpecificEntitiesConstraints.h>

Inheritance diagram for Lima::LinguisticProcessing::SpecificEntities::AddEntityFeature:
Lima::LinguisticProcessing::Automaton::ConstraintFunction

Public Member Functions

 AddEntityFeature (MediaId language, const LimaString &complement=LimaString())
 
 ~AddEntityFeature ()
 
bool operator() (const LinguisticAnalysisStructure::AnalysisGraph &graph, const LinguisticGraphVertex &vertex, 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).
 
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() (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::Automaton::ConstraintFunction
MediaId m_language_id
 
LimaString m_complement
 

Detailed Description

This action set the value of a feature for an entity during the recognition of the entity (i.e.

during the rule matching process). If a value already exists for the feature, the new value overwrite the previous one. Unary operator: associate the given vertex to the entity feature specified in the complement. Binary operator: associate the string delimited by the two vertices to the entity feature specified in the complement.

Definition at line 166 of file SpecificEntitiesConstraints.h.

Constructor & Destructor Documentation

◆ AddEntityFeature()

Lima::LinguisticProcessing::SpecificEntities::AddEntityFeature::AddEntityFeature ( MediaId  language,
const LimaString &  complement = LimaString() 
)

Definition at line 991 of file SpecificEntitiesConstraints.cpp.

◆ ~AddEntityFeature()

Lima::LinguisticProcessing::SpecificEntities::AddEntityFeature::~AddEntityFeature ( )
inline

Definition at line 171 of file SpecificEntitiesConstraints.h.

Member Function Documentation

◆ operator()() [1/2]

bool Lima::LinguisticProcessing::SpecificEntities::AddEntityFeature::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 1087 of file SpecificEntitiesConstraints.cpp.

◆ operator()() [2/2]

bool Lima::LinguisticProcessing::SpecificEntities::AddEntityFeature::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 1019 of file SpecificEntitiesConstraints.cpp.


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