18#ifndef NORMALIZEDATETIME_H
19#define NORMALIZEDATETIME_H
32#define NormalizeDateId "NormalizeDate"
33#define NormalizeRelativeDateId "NormalizeRelativeDate"
34#define NormalizeLocalTimeId "NormalizeLocalTime"
35#define NormalizeUTCTimeId "NormalizeUTCTime"
50 std::string& location)
const;
61 std::string m_dateRefName;
62 std::string m_timeRefName;
63 std::string m_locRefName;
88 const QDate& currentDate)
const;
95 QString
getDateSpan(
unsigned short year,
unsigned short month,
unsigned short day)
const;
130 const std::shared_ptr<NormalizeDateTimeResources>
getResources()
const {
return m_resources; }
135 getUTCTime(
const QDate& d,
136 const QTime& duration
143 std::shared_ptr<NormalizeDateTimeResources> m_resources;
#define LIMA_SPECIFICENTITIES_DATETIME_EXPORT
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
Provide function to read write and check a property.
ReferenceData m_referenceData
const std::set< LinguisticCode > * m_microsForMonth
unsigned short getDayFromString(const LimaString &numdayString) const
std::shared_ptr< NormalizeDateTimeResources > m_resources
NormalizeDate(MediaId language, const LimaString &complement=LimaString())
unsigned short getDay(Automaton::RecognizerMatch &m, const std::string &featureName) const
const std::set< LinguisticCode > * m_microsForDays
unsigned short getYear(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 getWeekDay(Automaton::RecognizerMatch &m, const std::string &featureName) const
QString getDateSpan(unsigned short year, unsigned short month, unsigned short day) const
bool actionNeedsRecognizedExpression() override
const Common::PropertyCode::PropertyAccessor * m_microAccessor
unsigned short getDefaultYear(AnalysisContent &analysis) const
void updateCurrentDate(AnalysisContent &analysis, const QDate ¤tDate) const
NormalizeLocalTime(MediaId language, const LimaString &complement=LimaString())
bool actionNeedsRecognizedExpression() override
NormalizeRelativeDate(MediaId language, const LimaString &complement=LimaString())
const ReferenceData & getReferenceData() const
const std::shared_ptr< NormalizeDateTimeResources > getResources() const
NormalizeTime(MediaId language, const LimaString &complement=LimaString())
virtual bool actionNeedsRecognizedExpression() override
bool hasResources() const
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,...
NormalizeUTCTime(MediaId language, const LimaString &complement=LimaString())
void setDateRefName(const std::string &name)
const std::string & getTimeRefName() const
void parseComplement(const LimaString &complement)
const std::string & getDateRefName() const
void setLocRefName(const std::string &name)
void parseReference(const LimaString &str)
bool getReferenceDate(const AnalysisContent &analysis, QDate &date) const
const std::string & getLocRefName() const
bool getReferenceLocation(const AnalysisContent &analysis, std::string &location) const
bool getReferenceTime(const AnalysisContent &analysis, QTime &time) const
void setTimeRefName(const std::string &name)