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

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

Inheritance diagram for Lima::LinguisticProcessing::SpecificEntities::NormalizeTime:
Lima::LinguisticProcessing::Automaton::ConstraintFunction Lima::LinguisticProcessing::SpecificEntities::NormalizeLocalTime Lima::LinguisticProcessing::SpecificEntities::NormalizeUTCTime

Public Member Functions

 NormalizeTime (MediaId language, const LimaString &complement=LimaString())
 
virtual ~NormalizeTime ()
 
virtual bool operator() (Automaton::RecognizerMatch &m, AnalysisContent &analysis) const override=0
 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 () override
 
const ReferenceData & getReferenceData () const
 
bool hasResources () const
 
const std::shared_ptr< NormalizeDateTimeResources > getResources () const
 
- 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 ()
 

Protected Member Functions

QTime getUTCTime (const QDate &d, const QTime &duration) const
 
QTime getTimeDuration (const Automaton::RecognizerMatch &m) const
 
- Protected Member Functions inherited from Lima::LinguisticProcessing::Automaton::ConstraintFunction
 ConstraintFunction (MediaId language, const LimaString &complement=LimaString())
 

Additional Inherited Members

- Protected Attributes inherited from Lima::LinguisticProcessing::Automaton::ConstraintFunction
MediaId m_language_id
 
LimaString m_complement
 

Detailed Description

Definition at line 117 of file NormalizeDateTime.h.

Constructor & Destructor Documentation

◆ NormalizeTime()

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

Definition at line 686 of file NormalizeDateTime.cpp.

◆ ~NormalizeTime()

virtual Lima::LinguisticProcessing::SpecificEntities::NormalizeTime::~NormalizeTime ( )
inlinevirtual

Definition at line 122 of file NormalizeDateTime.h.

Member Function Documentation

◆ actionNeedsRecognizedExpression()

virtual bool Lima::LinguisticProcessing::SpecificEntities::NormalizeTime::actionNeedsRecognizedExpression ( )
inlineoverridevirtual

◆ getReferenceData()

const ReferenceData & Lima::LinguisticProcessing::SpecificEntities::NormalizeTime::getReferenceData ( ) const
inline

Definition at line 128 of file NormalizeDateTime.h.

◆ getResources()

const std::shared_ptr< NormalizeDateTimeResources > Lima::LinguisticProcessing::SpecificEntities::NormalizeTime::getResources ( ) const
inline

Definition at line 130 of file NormalizeDateTime.h.

◆ getTimeDuration()

QTime Lima::LinguisticProcessing::SpecificEntities::NormalizeTime::getTimeDuration ( const Automaton::RecognizerMatch &  m) const
protected

Definition at line 716 of file NormalizeDateTime.cpp.

◆ getUTCTime()

QTime Lima::LinguisticProcessing::SpecificEntities::NormalizeTime::getUTCTime ( const QDate &  d,
const QTime &  duration 
) const
protected

Definition at line 786 of file NormalizeDateTime.cpp.

◆ hasResources()

bool Lima::LinguisticProcessing::SpecificEntities::NormalizeTime::hasResources ( ) const
inline

Definition at line 129 of file NormalizeDateTime.h.

◆ operator()()

virtual bool Lima::LinguisticProcessing::SpecificEntities::NormalizeTime::operator() ( Automaton::RecognizerMatch &  ,
AnalysisContent &   
) const
overridepure virtual

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::Automaton::ConstraintFunction.

Implemented in Lima::LinguisticProcessing::SpecificEntities::NormalizeLocalTime, and Lima::LinguisticProcessing::SpecificEntities::NormalizeUTCTime.


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