LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
CorefSolvingXmlLogger.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
14#ifndef LIMA_LINGUISTICPROCESSING_CSXMLLOGGER_H
15#define LIMA_LINGUISTICPROCESSING_CSXMLLOGGER_H
16
17#include "CorefSolvingExport.h"
24
25
26namespace Lima
27{
28namespace LinguisticProcessing
29{
30namespace Coreferences
31{
32
33#define COREFSOLVINGXMLLOGGER_CLASSID "CorefSolvingLogger"
34
35
36class LIMA_COREFSOLVING_EXPORT DumpXMLAnnotationVisitor : public boost::default_bfs_visitor
37{
38 std::ostream& m_ostream;
39// SyntacticAnalysis::SyntacticData* m_sd;
41 MediaId m_language;
42 LinguisticGraphEdge m_lastEdge;
43 std::string m_memo;
44// std::set<LinguisticGraphVertex> m_alreadyProcessedVertexs;
45// std::set<LinguisticGraphVertex> m_alreadyProcessedTargets;
46
47
48public:
49 DumpXMLAnnotationVisitor(std::ostream& os,
50// SyntacticAnalysis::SyntacticData* sd,
52 MediaId language):
53 m_ostream(os),/*m_sd(sd),*/m_ad(ad),m_language(language), m_lastEdge(LinguisticGraphEdge()),m_memo("") /*m_alreadyProcessedVertexs(),m_alreadyProcessedTargets()*/{}
54
55
56
57 void examine_edge(LinguisticGraphEdge e,
58 const LinguisticGraph& g);
59
60 bool are_equivalent(
61 LinguisticGraphEdge currentEdge,
62 LinguisticGraphVertex vProcessed,
63 LinguisticGraphVertex vNotProcessed,
64 const LinguisticGraph& g);
65
66// void discover_vertex(DependencyGraphVertex v,
67// const DependencyGraph& g);
68};
69
70
83{
84
85public:
86
88 virtual ~CorefSolvingXmlLogger();
89
90 void init(
92 Manager* manager) override
93 ;
94
95 LimaStatusCode process(
96 AnalysisContent& analysis) const override;
97
98protected:
99
100private:
101
102 std::string m_outputSuffix;
103 std::string m_graphId;
104 MediaId m_language;
105// std::set<DependencyGraphVertex> m_alreadyProcessedVertexs;
106// std::set<DependencyGraphVertex> m_alreadyProcessedTargets;
107 DependencyGraphEdge m_lastEdge;
108 std::string m_memo;
109
110 void dump(
111 std::ostream& fileName,
113 SyntacticAnalysis::SyntacticData* sd,*/
115
116};
117
118
119} // Coreferences
120} // LinguisticProcessing
121} // Lima
122
123#endif
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.
#define LIMA_COREFSOLVING_EXPORT
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
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.
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...
A logger process unit to output coreference solving results in XML format The process unit configurat...
DumpXMLAnnotationVisitor(std::ostream &os, Common::AnnotationGraphs::AnnotationData *ad, MediaId language)
An AnalysisData containing a LinguisticGraph with a language and an id.
NAUTITIA.
LimaStatusCode
Definition LimaCommon.h:236