LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
NormalizeNumber.h
Go to the documentation of this file.
1
// Copyright 2002-2013 CEA LIST
2
// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3
//
4
// SPDX-License-Identifier: MIT
5
6
/************************************************************************
7
*
8
* @file NormalizeNumber.h
9
* @author Besancon Romaric (romaric.besancon@cea.fr)
10
* @date Tue Jun 13 2006
11
* copyright Copyright (C) 2006-2012 by CEA LIST
12
* Project s2lp
13
*
14
* @brief action for normalization of number expressions
15
*
16
*
17
***********************************************************************/
18
19
#ifndef NORMALIZENUMBER_H
20
#define NORMALIZENUMBER_H
21
22
#include "
SpecificEntitiesExport.h
"
23
#include "
linguisticProcessing/core/Automaton/constraintFunction.h
"
24
25
namespace
Lima
{
26
namespace
LinguisticProcessing {
27
namespace
SpecificEntities {
28
29
//**********************************************************************
30
// ids of actions defined in this file
31
#define NormalizeNumberId "NormalizeNumber"
32
33
class
LIMA_SPECIFICENTITIES_NUMBER_EXPORT
NormalizeNumber
:
public
Automaton::ConstraintFunction
34
{
35
public
:
36
NormalizeNumber
(MediaId language,
37
const
LimaString
& complement=
LimaString
());
38
~NormalizeNumber
() {}
39
40
bool
operator()(
Automaton::RecognizerMatch
& m,
41
AnalysisContent
& analysis)
const override
;
42
43
bool
actionNeedsRecognizedExpression
()
override
{
return
true
; }
44
private
:
45
MediaId m_language;
46
const
std::set<LinguisticCode>* m_microsForNumber;
47
const
std::set<LinguisticCode>* m_microsForUnit;
48
const
std::set<LinguisticCode>* m_microsForConjunction;
49
const
Common::PropertyCode::PropertyAccessor
* m_microAccessor;
50
51
// private member functions
52
double
getNumberValue(
LinguisticAnalysisStructure::Token
* t,
53
LinguisticAnalysisStructure::MorphoSyntacticData
* data)
const
;
54
};
55
56
}
// end namespace
57
}
// end namespace
58
}
// end namespace
59
60
#endif
SpecificEntitiesExport.h
LIMA_SPECIFICENTITIES_NUMBER_EXPORT
#define LIMA_SPECIFICENTITIES_NUMBER_EXPORT
Definition
SpecificEntitiesExport.h:49
Lima::AnalysisContent
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
Definition
AnalysisContent.h:37
Lima::Common::PropertyCode::PropertyAccessor
Provide function to read write and check a property.
Definition
PropertyAccessor.h:31
Lima::LinguisticProcessing::Automaton::ConstraintFunction
Definition
constraintFunction.h:37
Lima::LinguisticProcessing::Automaton::RecognizerMatch
Definition
recognizerMatch.h:56
Lima::LinguisticProcessing::LinguisticAnalysisStructure::MorphoSyntacticData
Holds morphosyntactic informations.
Definition
MorphoSyntacticData.h:60
Lima::LinguisticProcessing::LinguisticAnalysisStructure::Token
holds surface data of a token
Definition
Token.h:32
Lima::LinguisticProcessing::SpecificEntities::NormalizeNumber
Definition
NormalizeNumber.h:34
Lima::LinguisticProcessing::SpecificEntities::NormalizeNumber::~NormalizeNumber
~NormalizeNumber()
Definition
NormalizeNumber.h:38
Lima::LinguisticProcessing::SpecificEntities::NormalizeNumber::actionNeedsRecognizedExpression
bool actionNeedsRecognizedExpression() override
Definition
NormalizeNumber.h:43
constraintFunction.h
Lima
NAUTITIA.
Definition
AmosePluginsManager.h:15
Lima::LimaString
QString LimaString
Definition
LimaString.h:33
lima_linguisticprocessing
src
linguisticProcessing
core
SpecificEntities
NormalizeNumber.h
Generated by
1.9.8