LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
NormalizePersonName.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 NormalizePersonName.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 the normalization of person names
15
*
16
*
17
***********************************************************************/
18
19
#ifndef NORMALIZEPERSONNAME_H
20
#define NORMALIZEPERSONNAME_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 NormalizePersonNameId "NormalizePersonName"
32
33
class
LIMA_SPECIFICENTITIES_PERSON_EXPORT
NormalizePersonName
:
public
Automaton::ConstraintFunction
34
{
35
public
:
36
NormalizePersonName
(MediaId language,
37
const
LimaString
& complement=
LimaString
());
38
~NormalizePersonName
() {}
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
53
private
:
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
SpecificEntitiesExport.h
LIMA_SPECIFICENTITIES_PERSON_EXPORT
#define LIMA_SPECIFICENTITIES_PERSON_EXPORT
Definition
SpecificEntitiesExport.h:50
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::SpecificEntities::NormalizePersonName
Definition
NormalizePersonName.h:34
Lima::LinguisticProcessing::SpecificEntities::NormalizePersonName::~NormalizePersonName
~NormalizePersonName()
Definition
NormalizePersonName.h:38
Lima::LinguisticProcessing::SpecificEntities::NormalizePersonName::actionNeedsRecognizedExpression
bool actionNeedsRecognizedExpression() override
Definition
NormalizePersonName.h:51
constraintFunction.h
Lima
NAUTITIA.
Definition
AmosePluginsManager.h:15
Lima::LimaString
QString LimaString
Definition
LimaString.h:33
lima_linguisticprocessing
src
linguisticProcessing
core
SpecificEntities
NormalizePersonName.h
Generated by
1.9.8