LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
applyRecognizer.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 applyRecognizer.h
9
* @author besancon (besanconr@zoe.cea.fr)
10
* @date Fri Jan 14 2005
11
* @version $Id$
12
* copyright Copyright (C) 2005-2012 by CEA LIST
13
* Project s2lp
14
*
15
* @brief this class contains a generic process unit for the
16
* application of automaton rules on a text (used for named entities,
17
* syntactic analysis...)
18
*
19
*
20
***********************************************************************/
21
#ifndef LIMA_LINGUISTICPROCESSING_APPLYRECOGNIZER_H
22
#define LIMA_LINGUISTICPROCESSING_APPLYRECOGNIZER_H
23
24
#include "
ApplyRecognizerExport.h
"
25
#include "
common/MediaProcessors/MediaProcessUnit.h
"
26
#include "
linguisticProcessing/core/Automaton/recognizerData.h
"
27
#include "
linguisticProcessing/core/Automaton/recognizer.h
"
28
29
namespace
Lima
{
30
namespace
LinguisticProcessing {
31
namespace
ApplyRecognizer
{
32
33
#define APPLYRECOGNIZER_CLASSID "ApplyRecognizer"
34
35
class
LIMA_APPLYRECOGNIZER_EXPORT
ApplyRecognizer
:
public
MediaProcessUnit
36
{
37
public
:
38
ApplyRecognizer
();
39
40
virtual
~ApplyRecognizer
();
41
42
void
init(
Common::XMLConfigurationFiles::GroupConfigurationStructure
& unitConfiguration,
43
Manager
* manager)
override
;
44
45
LimaStatusCode
process(
AnalysisContent
& analysis)
const override
;
46
47
private
:
48
// automaton to apply
49
std::vector<std::shared_ptr<Automaton::Recognizer>> m_recognizers;
50
51
// parameters of the application
52
bool
m_useSentenceBounds;
53
std::string m_sentenceBoundsData;
// name of data containing the boundaries if m_useSentenceBounds
54
bool
m_updateGraph;
55
bool
m_resolveOverlappingEntities;
56
Automaton::OverlapResolutionStrategy
m_overlappingEntitiesStrategy;
57
bool
m_testAllVertices;
58
bool
m_stopAtFirstSuccess;
59
bool
m_onlyOneSuccessPerType;
60
std::string m_graphId;
61
std::string m_dataForStorage;
62
63
// private member functions
64
// (this function should be in XMLConfigurationFiles)
65
bool
getBooleanParameter(
Common::XMLConfigurationFiles::GroupConfigurationStructure
& unitConfiguration,
66
const
std::string& param)
const
;
67
68
LimaStatusCode
processOnEachSentence(
AnalysisContent
& analysis,
69
Automaton::Recognizer
* reco,
70
RecognizerData
* recoData)
const
;
71
LimaStatusCode
processOnWholeText(
AnalysisContent
& analysis,
72
Automaton::Recognizer
* reco,
73
RecognizerData
* recoData)
const
;
74
};
75
76
}
// end namespace
77
}
// end namespace
78
}
// end namespace
79
80
#endif
ApplyRecognizerExport.h
LIMA_APPLYRECOGNIZER_EXPORT
#define LIMA_APPLYRECOGNIZER_EXPORT
Definition
ApplyRecognizerExport.h:27
MediaProcessUnit.h
Lima::AnalysisContent
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
Definition
AnalysisContent.h:37
Lima::Common::XMLConfigurationFiles::GroupConfigurationStructure
Definition
groupConfigurationStructure.h:32
Lima::InitializableObjectManager
Manage initialization of InitializableObjects using configuration module and parameters.
Definition
InitializableObjectManager.h:32
Lima::LinguisticProcessing::ApplyRecognizer::ApplyRecognizer
Definition
applyRecognizer.h:36
Lima::LinguisticProcessing::ApplyRecognizer::RecognizerData
Definition
recognizerData.h:57
Lima::LinguisticProcessing::Automaton::Recognizer
␈rief a class for the definition of a complete recognizer
Definition
recognizer.h:78
Lima::MediaProcessUnit
Definition
MediaProcessUnit.h:33
Lima::LinguisticProcessing::ApplyRecognizer::ApplyRecognizer
SimpleFactory< MediaProcessUnit, ApplyRecognizer > ApplyRecognizer(APPLYRECOGNIZER_CLASSID)
Lima::LinguisticProcessing::Automaton::OverlapResolutionStrategy
OverlapResolutionStrategy
an enumerated type to indicate which kind of strategy adopt to deal with two overlapping entities
Definition
recognizer.h:43
Lima
NAUTITIA.
Definition
AmosePluginsManager.h:15
Lima::LimaStatusCode
LimaStatusCode
Definition
LimaCommon.h:236
recognizerData.h
recognizer.h
lima_linguisticprocessing
src
linguisticProcessing
core
ApplyRecognizer
applyRecognizer.h
Generated by
1.9.8