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
24
25namespace Lima {
26namespace LinguisticProcessing {
27namespace SpecificEntities {
28
29//**********************************************************************
30// ids of actions defined in this file
31#define NormalizeNumberId "NormalizeNumber"
32
34{
35public:
36 NormalizeNumber(MediaId language,
37 const LimaString& complement=LimaString());
39
40 bool operator()(Automaton::RecognizerMatch& m,
41 AnalysisContent& analysis) const override;
42
43 bool actionNeedsRecognizedExpression() override { return true; }
44private:
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,
54};
55
56} // end namespace
57} // end namespace
58} // end namespace
59
60#endif
#define LIMA_SPECIFICENTITIES_NUMBER_EXPORT
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
Provide function to read write and check a property.
NAUTITIA.
QString LimaString
Definition LimaString.h:33