LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
NormalizePerson.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 NormalizePerson.h
9 * @author Olivier Mesnarrd (olivier.mesnard@cea.fr)
10 * @date Wed Jan 13 2015
11 * copyright Copyright (C) 2006-2015 by CEA LIST
12 * Project lima_linguisticprocessing
13 *
14 * @brief action for the normalization of person (replace normalization of person name)
15 *
16 *
17 ***********************************************************************/
18
19#ifndef NORMALIZEPERSON_H
20#define NORMALIZEPERSON_H
21
24
25namespace Lima {
26namespace LinguisticProcessing {
27namespace SpecificEntities {
28
29//**********************************************************************
30// ids of actions defined in this file
31#define NormalizePersonId "NormalizePerson"
32
34{
35public:
36 NormalizePerson(MediaId language,
37 const LimaString& complement=LimaString());
39
40 // function to normalize person names specifying firstname and lastname
41/* bool operator()(const LinguisticAnalysisStructure::AnalysisGraph& graph, */
42/* const LinguisticGraphVertex& v1, */
43/* const LinguisticGraphVertex& v2, */
44/* AnalysisContent& analysis) const; */
45
46 // function to normalize person names using a simple heuristic on result
47 // to separate firstname from lastname
48 bool operator()(Automaton::RecognizerMatch& m,
49 AnalysisContent& analysis) const override;
50
51 bool actionNeedsRecognizedExpression() override { return true; }
52
53private:
54 MediaId m_language;
55 LimaString m_firstname; // values of firstname and lastname
56 LimaString m_lastname; // possibly given as arguments of the action
57 const std::set<LinguisticCode>* m_microsForFirstname;
58 const Common::PropertyCode::PropertyAccessor* m_microAccessor;
59};
60
61} // end namespace
62} // end namespace
63} // end namespace
64
65#endif
#define LIMA_SPECIFICENTITIES_PERSON_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