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

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

Inheritance diagram for Lima::LinguisticProcessing::SpecificEntities::NormalizeRelativeDate:
Lima::LinguisticProcessing::SpecificEntities::NormalizeDate Lima::LinguisticProcessing::Automaton::ConstraintFunction

Public Member Functions

 NormalizeRelativeDate (MediaId language, const LimaString &complement=LimaString())
 
 ~NormalizeRelativeDate ()
 
bool operator() (Automaton::RecognizerMatch &m, 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
 
bool actionNeedsRecognizedExpression () override
 
- Public Member Functions inherited from Lima::LinguisticProcessing::SpecificEntities::NormalizeDate
 NormalizeDate (MediaId language, const LimaString &complement=LimaString())
 
 ~NormalizeDate ()
 
- 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::SpecificEntities::NormalizeDate
void updateCurrentDate (AnalysisContent &analysis, const QDate &currentDate) const
 
unsigned short getDayFromString (const LimaString &numdayString) const
 
unsigned short getDay (Automaton::RecognizerMatch &m, const std::string &featureName) const
 
unsigned short getWeekDay (Automaton::RecognizerMatch &m, const std::string &featureName) const
 
unsigned short getMonth (Automaton::RecognizerMatch &m, const std::string &featureName, const std::string &alt="") const
 
unsigned short getYear (Automaton::RecognizerMatch &m, const std::string &featureName) const
 
unsigned short getDefaultYear (AnalysisContent &analysis) const
 
QString getDateSpan (unsigned short year, unsigned short month, unsigned short day) const
 
- Protected Member Functions inherited from Lima::LinguisticProcessing::Automaton::ConstraintFunction
 ConstraintFunction (MediaId language, const LimaString &complement=LimaString())
 
- Protected Attributes inherited from Lima::LinguisticProcessing::SpecificEntities::NormalizeDate
MediaId m_language
 
std::shared_ptr< NormalizeDateTimeResources > m_resources
 
ReferenceData m_referenceData
 
const std::set< LinguisticCode > * m_microsForMonth
 
const std::set< LinguisticCode > * m_microsForDays
 
const Common::PropertyCode::PropertyAccessor * m_microAccessor
 
bool m_isInterval
 
- Protected Attributes inherited from Lima::LinguisticProcessing::Automaton::ConstraintFunction
MediaId m_language_id
 
LimaString m_complement
 

Detailed Description

Definition at line 99 of file NormalizeDateTime.h.

Constructor & Destructor Documentation

◆ NormalizeRelativeDate()

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

Definition at line 534 of file NormalizeDateTime.cpp.

◆ ~NormalizeRelativeDate()

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

Definition at line 104 of file NormalizeDateTime.h.

Member Function Documentation

◆ actionNeedsRecognizedExpression()

bool Lima::LinguisticProcessing::SpecificEntities::NormalizeRelativeDate::actionNeedsRecognizedExpression ( )
inlineoverridevirtual

◆ operator()()

bool Lima::LinguisticProcessing::SpecificEntities::NormalizeRelativeDate::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::SpecificEntities::NormalizeDate.

Definition at line 591 of file NormalizeDateTime.cpp.


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