LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
WordSenseXmlLogger.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#ifndef LIMA_WORDSENSEDISAMBIGUATION_WSXMLLOGGER_H
7#define LIMA_WORDSENSEDISAMBIGUATION_WSXMLLOGGER_H
8
26
27namespace Lima
28{
29namespace LinguisticProcessing
30{
31namespace WordSenseDisambiguation
32{
33
34
35#define WORDSENSEXMLLOGGER_CLASSID "WordSenseXmlLogger"
36
37
38
39class LIMA_WORDSENSEANALYSIS_EXPORT DumpXMLAnnotationVisitor : public boost::default_bfs_visitor
40{
41 std::ostream& m_ostream;
43 MediaId m_language;
44 LinguisticGraphEdge m_lastEdge;
45 std::string m_memo;
46
47public:
48 DumpXMLAnnotationVisitor(std::ostream& os,
50 MediaId language):
51 m_ostream(os),m_ad(ad),m_language(language), m_lastEdge(LinguisticGraphEdge()),m_memo("") {}
52
53
54
55 void examine_edge(LinguisticGraphEdge e,
56 const LinguisticGraph& g);
57
58
59
60};
61
63{
64
65public:
66
68 virtual ~WordSenseXmlLogger();
69
70 void init(
72 Manager* manager) override;
73
74 LimaStatusCode process(
75 AnalysisContent& analysis) const override;
76
77protected:
78
79private:
80
81 std::string m_outputSuffix;
82 std::string m_graphId;
83 MediaId m_language;
84 DependencyGraphEdge m_lastEdge;
85 std::string m_memo;
86
87 void dump(
88 std::ostream& fileName,
91
92};
93
94
95} // WordSenseDisambiguation
96} // LinguisticProcessing
97} // Lima
98
99
100#endif // WORDSENSEXMLLOGGER_H
This file is the main header file for the data related to annotation graphs.
A graph that stores any data (annotations) referencing primarily nodes of a text anlaysis.
DependencyGraph::edge_descriptor DependencyGraphEdge
typedefs to simplify the acces to various graphs elements
boost::graph_traits< LinguisticGraph >::edge_descriptor LinguisticGraphEdge
typedefs to simplify the access to various graphs elements
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.
#define LIMA_WORDSENSEANALYSIS_EXPORT
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
Holds an annotation graph and gives an API to manipulate it.
Manage initialization of InitializableObjects using configuration module and parameters.
A generic process unit to log information in files: contains some common informations such as : outpu...
An AnalysisData containing a LinguisticGraph with a language and an id.
DumpXMLAnnotationVisitor(std::ostream &os, Common::AnnotationGraphs::AnnotationData *ad, MediaId language)
NAUTITIA.
LimaStatusCode
Definition LimaCommon.h:236