LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
posGraphXmlDumper.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
22#ifndef LIMA_LINGUISTICPROCESSINGS_ANALYSISDUMPERS_POSGRAPHXMLDUMPER_H
23#define LIMA_LINGUISTICPROCESSINGS_ANALYSISDUMPERS_POSGRAPHXMLDUMPER_H
24
25
28#include "StopList.h"
32
33#include <boost/tuple/tuple.hpp>
34#include <boost/graph/properties.hpp>
35
36#include <map>
37#include <iostream>
38#include <set>
39
40
41namespace Lima {
42namespace Common {
43 namespace AnnotationGraphs {
44 class AnnotationData;
45 }
46 namespace BagOfWords {
47 class BoWTerm;
48 }
49}
50namespace LinguisticProcessing {
51 namespace Compounds {
52 class BowGenerator;
53 }
54namespace AnalysisDumpers {
55
56#define POSGRAPHXMLDUMPER_CLASSID "posGraphXmlDumper"
57
58
60{
61
62 MediaId m_language;
64 LinguisticGraphEdge m_lastEdge;
65
66
67
68
69public:
71
72 virtual ~posGraphXmlDumper();
73
74 void init(
76 Manager* manager) override;
77
78 LimaStatusCode process(
79 AnalysisContent& analysis) const override;
80
81
82protected:
83 void dumpLimaData(std::ostream& os,
84 const LinguisticGraphVertex begin,
85 const LinguisticGraphVertex end,
88 const SyntacticAnalysis::SyntacticData* syntacticData,
89 const Common::AnnotationGraphs::AnnotationData* annotationData,
90 const std::string& graphId,
91 bool bySentence,
92 std::vector< bool >& alreadyDumpedTokens,
93 std::map< LinguisticAnalysisStructure::Token*, uint64_t >& fullTokens,
94 int sentenceId) const;
95
96 LimaString getPosition(const uint64_t position) const;
97
98 void outputVertex(const LinguisticGraphVertex v,
99 const LinguisticGraph& lanagraph,
100 const LinguisticGraph& lposgraph,
101 const SyntacticAnalysis::SyntacticData* syntacticData,
102 const Common::AnnotationGraphs::AnnotationData* annotationData,
103 std::ostream& xmlStream,
104 std::map< LinguisticAnalysisStructure::Token*, uint64_t >& fullTokens,
105 std::vector< bool >& alreadyDumpedFullTokens,
106 const std::string& graphId) const;
107
108 void outputEdge(const LinguisticGraphEdge e,
109 const LinguisticGraph& graph,
110 std::ostream& xmlStream) const;
111
112 void naturalCompoundTokenString(const Common::BagOfWords::BoWTerm* compound, QVector<LimaString>& result) const;
113
115
117 std::string m_graph;
118 std::string m_handler;
119
121};
122
123} // end namespace AnalysisDumpers
124} // end namespace LinguisticProcessings
125} // end namespace Lima
126
127#endif
#define LIMA_ANALYSISDUMPERS_EXPORT
A graph structure for linguistic analysis.
boost::graph_traits< LinguisticGraph >::edge_descriptor LinguisticGraphEdge
typedefs to simplify the access to various graphs elements
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, LinguisticVertexProperties > LinguisticGraph
Property to identify the chains in the graph.
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.
This is a complex token used to represent a multiword term.
Definition bowTerm.h:36
Provide tools to parse a property file, and deal with the property coding system.
Manage initialization of InitializableObjects using configuration module and parameters.
LinguisticProcessing::Compounds::BowGenerator * m_bowGenerator
const Common::PropertyCode::PropertyCodeManager * m_propertyCodeManager
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
QString LimaString
Definition LimaString.h:33