LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
easyXmlDumper.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
20#ifndef LIMA_LINGUISTICPROCESSINGS_ANALYSISDUMPERS_EASYXMLDUMPER_EASYXMLDUMPER_H
21#define LIMA_LINGUISTICPROCESSINGS_ANALYSISDUMPERS_EASYXMLDUMPER_EASYXMLDUMPER_H
22
23#include "EasyXmlDumperExport.h"
25#include "EasyDumper.h"
26
33
34#include <map>
35#include <iostream>
36#include <set>
37#include <algorithm>
38
39namespace Lima {
40namespace LinguisticProcessing {
41namespace AnalysisDumpers {
42namespace EasyXmlDumper {
43
44#define EASYXMLDUMPER_CLASSID "EasyXmlDumper"
45
52class LIMA_EASYXMLDUMPER_EXPORT EasyXmlDumper : public MediaProcessUnit
53{
54
55public:
56
58
59 virtual ~EasyXmlDumper();
60
61 void init(
63 Manager* manager) override;
64
65 LimaStatusCode process(AnalysisContent& analysis) const override;
66
67 std::vector<std::string> m_sentIds;
68
69protected:
70
71 void dumpLimaData(std::ostream& os,
72 const LinguisticGraphVertex& begin,
73 const LinguisticGraphVertex& end,
76 const Common::AnnotationGraphs::AnnotationData& annotationData,
77 const SyntacticAnalysis::SyntacticData& syntacticData,
78 const std::string& graphId,
79 std::vector< bool >& alreadyDumpedTokens,
80 std::map< LinguisticAnalysisStructure::Token*, uint64_t >& easyTokens,
81 std::string sentIdPrefix) const;
82
83 MediaId m_language;
85
86 std::string m_graph;
87
88private:
89
90 std::map<std::string,std::string> m_typeMapping;
91 std::map<std::string,std::string> m_srcTag;
92 std::map<std::string,std::string> m_tgtTag;
93 std::string m_handler;
94};
95
96} // end namespace EasyXmlDumper
97} // end namespace AnalysisDumpers
98} // end namespace LinguisticProcessings
99} // end namespace Lima
100
101#endif // LIMA_LINGUISTICPROCESSINGS_ANALYSISDUMPERS_EASYXMLDUMPER_EASYXMLDUMPER_H
This file is the main header file for the data related to annotation graphs.
extracts forms and relations from boost graph (origninally, from XML file)
dump the content of the analysis graph in Easy XML format
A graph structure for linguistic analysis.
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
Data used for the syntactic analyzis of texts.
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
Holds an annotation graph and gives an API to manipulate it.
Provide tools to parse a property file, and deal with the property coding system.
Manage initialization of InitializableObjects using configuration module and parameters.
Dumps all the content of the analysis on an XML stream.
const Common::PropertyCode::PropertyCodeManager * m_propertyCodeManager
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