LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
BowDumper.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
* Copyright (C) 2004-2012 by CEA LIST *
8
* *
9
***************************************************************************/
10
#ifndef LIMA_LINGUISTICPROCESSING_ANALYSISDUMPERSBOWDUMPER_H
11
#define LIMA_LINGUISTICPROCESSING_ANALYSISDUMPERSBOWDUMPER_H
12
13
#include "
AnalysisDumpersExport.h
"
14
#include "
common/MediaProcessors/MediaProcessUnit.h
"
15
#include "
StopList.h
"
16
17
#include "
linguisticProcessing/core/LinguisticAnalysisStructure/LinguisticGraph.h
"
18
#include "
linguisticProcessing/core/LinguisticAnalysisStructure/MorphoSyntacticData.h
"
19
#include "
linguisticProcessing/core/Automaton/SpecificEntityAnnotation.h
"
20
#include "
linguisticProcessing/common/BagOfWords/bowText.h
"
21
#include "
linguisticProcessing/common/annotationGraph/AnnotationGraph.h
"
22
#include "
linguisticProcessing/core/LinguisticProcessors/AbstractTextualAnalysisDumper.h
"
23
24
namespace
Lima
25
{
26
namespace
Common
27
{
28
namespace
AnnotationGraphs
29
{
30
class
AnnotationData;
31
}
32
namespace
BagOfWords
33
{
34
class
BoWNamedEntity;
35
}
36
}
37
namespace
LinguisticProcessing
38
{
39
namespace
SyntacticAnalysis
40
{
41
class
SyntacticData
;
42
}
43
namespace
Compounds
44
{
45
class
BowGenerator
;
46
}
47
namespace
AnalysisDumpers
48
{
49
50
#define BOWDUMPER_CLASSID "BowDumper"
51
55
class
LIMA_ANALYSISDUMPERS_EXPORT
BowDumper
:
public
AbstractTextualAnalysisDumper
56
{
57
public
:
58
BowDumper
();
59
60
virtual
~BowDumper
();
61
62
virtual
void
init(
63
Common::XMLConfigurationFiles::GroupConfigurationStructure
& unitConfiguration,
64
Manager
* manager)
override
;
65
66
virtual
LimaStatusCode
process(
67
AnalysisContent
& analysis)
const override
;
68
69
protected
:
70
Compounds::BowGenerator
*
m_bowGenerator
;
71
std::string
m_graph
;
72
bool
m_allEntities
;
73
bool
m_xml
;
// if true, output is not binary but text, in XML format
74
75
private
:
76
void
buildBoWText(
77
const
Common::AnnotationGraphs::AnnotationData
* annotationData,
78
const
SyntacticAnalysis::SyntacticData
* syntacticData,
79
Common::BagOfWords::BoWText
& bowText,
80
AnalysisContent
& analysis,
81
LinguisticAnalysisStructure::AnalysisGraph
* anagraph,
82
LinguisticAnalysisStructure::AnalysisGraph
* posgraph,
83
std::set<LinguisticGraphVertex>& addedEntities,
84
const
uint64_t offset)
const
;
85
86
void
addVerticesToBoWText(
87
const
Common::AnnotationGraphs::AnnotationData
* annotationData,
88
LinguisticAnalysisStructure::AnalysisGraph
* anagraph,
89
LinguisticAnalysisStructure::AnalysisGraph
* posgraph,
90
const
SyntacticAnalysis::SyntacticData
* syntacticData,
91
const
LinguisticGraphVertex
begin,
92
const
LinguisticGraphVertex
end,
93
const
uint64_t offset,
94
Common::BagOfWords::BoWText
& bowText,
95
std::set<LinguisticGraphVertex>& addedEntities)
const
;
96
97
void
addAllEntities(
98
const
Common::AnnotationGraphs::AnnotationData
* annotationData,
99
const
std::set<LinguisticGraphVertex>& addedEntities,
100
Common::BagOfWords::BoWText
& bowText,
101
LinguisticAnalysisStructure::AnalysisGraph
* anagraph,
102
LinguisticAnalysisStructure::AnalysisGraph
* posgraph,
103
const
uint64_t offset=0)
const
;
104
105
};
106
107
}
// AnalysisDumpers
108
109
}
// LinguisticProcessing
110
111
}
// Lima
112
113
#endif
AbstractTextualAnalysisDumper.h
AnalysisDumpersExport.h
LIMA_ANALYSISDUMPERS_EXPORT
#define LIMA_ANALYSISDUMPERS_EXPORT
Definition
AnalysisDumpersExport.h:27
AnnotationGraph.h
A graph that stores any data (annotations) referencing primarily nodes of a text anlaysis.
LinguisticGraph.h
A graph structure for linguistic analysis.
LinguisticGraphVertex
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
Definition
LinguisticGraph.h:100
MediaProcessUnit.h
MorphoSyntacticData.h
SpecificEntityAnnotation.h
StopList.h
bowText.h
Lima::AnalysisContent
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
Definition
AnalysisContent.h:37
Lima::Common::AnnotationGraphs::AnnotationData
Holds an annotation graph and gives an API to manipulate it.
Definition
AnnotationData.h:35
Lima::Common::BagOfWords::BoWText
This class represents a list of elements, that are pointers on polymmorphic tokens that can be simple...
Definition
bowText.h:48
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::AbstractTextualAnalysisDumper
Definition
AbstractTextualAnalysisDumper.h:26
Lima::LinguisticProcessing::AnalysisDumpers::BowDumper
Definition
BowDumper.h:56
Lima::LinguisticProcessing::AnalysisDumpers::BowDumper::m_allEntities
bool m_allEntities
Definition
BowDumper.h:72
Lima::LinguisticProcessing::AnalysisDumpers::BowDumper::m_bowGenerator
Compounds::BowGenerator * m_bowGenerator
Definition
BowDumper.h:70
Lima::LinguisticProcessing::AnalysisDumpers::BowDumper::m_graph
std::string m_graph
Definition
BowDumper.h:71
Lima::LinguisticProcessing::AnalysisDumpers::BowDumper::m_xml
bool m_xml
Definition
BowDumper.h:73
Lima::LinguisticProcessing::Compounds::BowGenerator
Parameters retrived in the configuration file:
Definition
BowGeneration.h:74
Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph
An AnalysisData containing a LinguisticGraph with a language and an id.
Definition
AnalysisGraph.h:47
Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticData
This class points to a graph, its dependency graph and the structure that holds the maping between th...
Definition
SyntacticData.h:51
Lima
NAUTITIA.
Definition
AmosePluginsManager.h:15
Lima::LimaStatusCode
LimaStatusCode
Definition
LimaCommon.h:236
lima_linguisticprocessing
src
linguisticProcessing
core
AnalysisDumpers
BowDumper.h
Generated by
1.9.8