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
15#include "StopList.h"
16
23
24namespace Lima
25{
26namespace Common
27{
28namespace AnnotationGraphs
29{
30 class AnnotationData;
31}
32namespace BagOfWords
33{
34 class BoWNamedEntity;
35}
36}
37namespace LinguisticProcessing
38{
39namespace SyntacticAnalysis
40{
41 class SyntacticData;
42}
43namespace Compounds
44{
45 class BowGenerator;
46}
47namespace AnalysisDumpers
48{
49
50#define BOWDUMPER_CLASSID "BowDumper"
51
56{
57public:
58 BowDumper();
59
60 virtual ~BowDumper();
61
62 virtual void init(
64 Manager* manager) override;
65
66 virtual LimaStatusCode process(
67 AnalysisContent& analysis) const override;
68
69protected:
71 std::string m_graph;
73 bool m_xml; // if true, output is not binary but text, in XML format
74
75private:
76 void buildBoWText(
77 const Common::AnnotationGraphs::AnnotationData* annotationData,
78 const SyntacticAnalysis::SyntacticData* syntacticData,
80 AnalysisContent& analysis,
83 std::set<LinguisticGraphVertex>& addedEntities,
84 const uint64_t offset) const;
85
86 void addVerticesToBoWText(
87 const Common::AnnotationGraphs::AnnotationData* annotationData,
90 const SyntacticAnalysis::SyntacticData* syntacticData,
91 const LinguisticGraphVertex begin,
92 const LinguisticGraphVertex end,
93 const uint64_t offset,
95 std::set<LinguisticGraphVertex>& addedEntities) const;
96
97 void addAllEntities(
98 const Common::AnnotationGraphs::AnnotationData* annotationData,
99 const std::set<LinguisticGraphVertex>& addedEntities,
103 const uint64_t offset=0) const;
104
105};
106
107} // AnalysisDumpers
108
109} // LinguisticProcessing
110
111} // Lima
112
113#endif
#define LIMA_ANALYSISDUMPERS_EXPORT
A graph that stores any data (annotations) referencing primarily nodes of a text anlaysis.
A graph structure for linguistic analysis.
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
Holds an annotation graph and gives an API to manipulate it.
This class represents a list of elements, that are pointers on polymmorphic tokens that can be simple...
Definition bowText.h:48
Manage initialization of InitializableObjects using configuration module and parameters.
Parameters retrived in the configuration file:
An AnalysisData containing a LinguisticGraph with a language and an id.
This class points to a graph, its dependency graph and the structure that holds the maping between th...
NAUTITIA.
LimaStatusCode
Definition LimaCommon.h:236