LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::LinguisticProcessing::AnalysisDumpers::EasyXmlDumper::EasyXmlDumper Class Reference

Dumps all the content of the analysis on an XML stream. More...

#include <linguisticProcessing/core/AnalysisDumpers/EasyXmlDumper/easyXmlDumper.h>

Inheritance diagram for Lima::LinguisticProcessing::AnalysisDumpers::EasyXmlDumper::EasyXmlDumper:
Lima::MediaProcessUnit Lima::AbstractProcessUnit< MediaProcessUnit, MediaProcessUnitInitializationParameters > Lima::InitializableObject< Base, InitializationParameters >

Public Member Functions

 EasyXmlDumper ()
 
virtual ~EasyXmlDumper ()
 
void init (Common::XMLConfigurationFiles::GroupConfigurationStructure &unitConfiguration, Manager *manager) override
 initialize with parameters from configuration file.
 
LimaStatusCode process (AnalysisContent &analysis) const override
 Process on data in analysisContent.
 
- Public Member Functions inherited from Lima::InitializableObject< Base, InitializationParameters >
 InitializableObject ()
 
 InitializableObject (const InitializableObject &object)
 
InitializableObject & operator= (const InitializableObject &object)
 
virtual ~InitializableObject ()
 
const std::string & getId () const
 get the object id
 
void setId (const std::string &id)
 set the object id
 

Public Attributes

std::vector< std::string > m_sentIds
 

Protected Member Functions

void dumpLimaData (std::ostream &os, const LinguisticGraphVertex &begin, const LinguisticGraphVertex &end, const LinguisticAnalysisStructure::AnalysisGraph &anaGraph, const LinguisticAnalysisStructure::AnalysisGraph &posGraph, const Common::AnnotationGraphs::AnnotationData &annotationData, const SyntacticAnalysis::SyntacticData &syntacticData, const std::string &graphId, std::vector< bool > &alreadyDumpedTokens, std::map< LinguisticAnalysisStructure::Token *, uint64_t > &easyTokens, std::string sentIdPrefix) const
 

Protected Attributes

MediaId m_language
 
const Common::PropertyCode::PropertyCodeManager * m_propertyCodeManager
 
std::string m_graph
 
- Protected Attributes inherited from Lima::InitializableObject< Base, InitializationParameters >
std::string m_id
 

Additional Inherited Members

- Public Types inherited from Lima::InitializableObject< Base, InitializationParameters >
typedef InitializableObjectManager< Base, InitializationParameters > Manager
 Manager is the type of the Manager associated to the initializableObject.
 
typedef InitializableObjectFactory< Base > Factory
 Factory is the type of the Factory associated to the initializableObject.
 

Detailed Description

Dumps all the content of the analysis on an XML stream.

The exact state should be rebuildable from the dump

Todo:
ensure to dump all the nodes one time and only one time, sentence by sentence for the main stream

Definition at line 52 of file easyXmlDumper.h.

Constructor & Destructor Documentation

◆ EasyXmlDumper()

Lima::LinguisticProcessing::AnalysisDumpers::EasyXmlDumper::EasyXmlDumper::EasyXmlDumper ( )

Definition at line 69 of file easyXmlDumper.cpp.

◆ ~EasyXmlDumper()

Lima::LinguisticProcessing::AnalysisDumpers::EasyXmlDumper::EasyXmlDumper::~EasyXmlDumper ( )
virtual

Definition at line 75 of file easyXmlDumper.cpp.

Member Function Documentation

◆ dumpLimaData()

void Lima::LinguisticProcessing::AnalysisDumpers::EasyXmlDumper::EasyXmlDumper::dumpLimaData ( std::ostream &  os,
const LinguisticGraphVertex &  begin,
const LinguisticGraphVertex &  end,
const LinguisticAnalysisStructure::AnalysisGraph &  anaGraph,
const LinguisticAnalysisStructure::AnalysisGraph &  posGraph,
const Common::AnnotationGraphs::AnnotationData &  annotationData,
const SyntacticAnalysis::SyntacticData &  syntacticData,
const std::string &  graphId,
std::vector< bool > &  alreadyDumpedTokens,
std::map< LinguisticAnalysisStructure::Token *, uint64_t > &  easyTokens,
std::string  sentIdPrefix 
) const
protected

Definition at line 238 of file easyXmlDumper.cpp.

◆ init()

void Lima::LinguisticProcessing::AnalysisDumpers::EasyXmlDumper::EasyXmlDumper::init ( Common::XMLConfigurationFiles::GroupConfigurationStructure &  unitConfiguration,
Manager *  manager 
)
overridevirtual

initialize with parameters from configuration file.

Parameters
unitConfiguration@IN : <group> tag in xml configuration file that contains parameters to initialize the object.
manager@IN : manager that asked for initialization and carries init params Use it to initialize other objects of same kind.
Exceptions
InvalidConfigurationwhen parameters are invalids.

Implements Lima::MediaProcessUnit.

Definition at line 79 of file easyXmlDumper.cpp.

◆ process()

LimaStatusCode Lima::LinguisticProcessing::AnalysisDumpers::EasyXmlDumper::EasyXmlDumper::process ( AnalysisContent &  analysis) const
overridevirtual

Process on data in analysisContent.

This method should not return any exception

Parameters
analysisAnalysisContent object on which to process
Exceptions
UndefinedMethodif this method hasn't been specialized

Implements Lima::MediaProcessUnit.

Definition at line 118 of file easyXmlDumper.cpp.

Member Data Documentation

◆ m_graph

std::string Lima::LinguisticProcessing::AnalysisDumpers::EasyXmlDumper::EasyXmlDumper::m_graph
protected

Definition at line 86 of file easyXmlDumper.h.

◆ m_language

MediaId Lima::LinguisticProcessing::AnalysisDumpers::EasyXmlDumper::EasyXmlDumper::m_language
protected

Definition at line 83 of file easyXmlDumper.h.

◆ m_propertyCodeManager

const Common::PropertyCode::PropertyCodeManager* Lima::LinguisticProcessing::AnalysisDumpers::EasyXmlDumper::EasyXmlDumper::m_propertyCodeManager
protected

Definition at line 84 of file easyXmlDumper.h.

◆ m_sentIds

std::vector<std::string> Lima::LinguisticProcessing::AnalysisDumpers::EasyXmlDumper::EasyXmlDumper::m_sentIds

Definition at line 67 of file easyXmlDumper.h.


The documentation for this class was generated from the following files: