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
28
29namespace Lima {
30namespace LinguisticProcessing {
31namespace ApplyRecognizer {
32
33#define APPLYRECOGNIZER_CLASSID "ApplyRecognizer"
34
36{
37public:
39
40 virtual ~ApplyRecognizer();
41
43 Manager* manager) override;
44
45 LimaStatusCode process(AnalysisContent& analysis) const override;
46
47private:
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,
70 RecognizerData* recoData) const;
71 LimaStatusCode processOnWholeText(AnalysisContent& analysis,
73 RecognizerData* recoData) const;
74};
75
76} // end namespace
77} // end namespace
78} // end namespace
79
80#endif
#define LIMA_APPLYRECOGNIZER_EXPORT
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
Manage initialization of InitializableObjects using configuration module and parameters.
␈rief a class for the definition of a complete recognizer
Definition recognizer.h:78
SimpleFactory< MediaProcessUnit, ApplyRecognizer > ApplyRecognizer(APPLYRECOGNIZER_CLASSID)
OverlapResolutionStrategy
an enumerated type to indicate which kind of strategy adopt to deal with two overlapping entities
Definition recognizer.h:43
NAUTITIA.
LimaStatusCode
Definition LimaCommon.h:236