10#ifndef LIMA_LINGUISTICPROCESSING_SIMPLEXMLBOWDUMPER_H
11#define LIMA_LINGUISTICPROCESSING_SIMPLEXMLBOWDUMPER_H
34#define GENERICXMLDUMPER_CLASSID "GenericXmlDumper"
85 const std::deque<std::string>& featureOrder=std::deque<std::string>());
103 const uint64_t offset)
const;
114 std::set<LinguisticGraphVertex>& visited,
115 std::set<LinguisticGraphVertex>& alreadyStoredVertices)
const;
121 uint64_t offset)
const;
129 std::pair<const SpecificEntities::SpecificEntityAnnotation*,LinguisticAnalysisStructure::AnalysisGraph*>
140 uint64_t offset)
const;
145 const std::string& featureName,
147 uint64_t offset)
const;
149 std::vector< boost::shared_ptr< Common::BagOfWords::BoWToken > >
156 std::set<LinguisticGraphVertex>& visited)
const;
177 std::string
xmlString(
const std::string& str)
const;
178 void replace(std::string& str,
const std::string& toReplace,
const std::string& newValue)
const;
#define LIMA_ANALYSISDUMPERS_EXPORT
A graph that stores any data (annotations) referencing primarily nodes of a text anlaysis.
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.
This class is the abstract base class of all elements that can be stored in a BoWText.
InitializableObjectManager< MediaProcessUnit, MediaProcessUnitInitializationParameters > Manager
AbstractTextualAnalysisDumper()
std::string m_specificEntityTag
void xmlOutputVertices(std::ostream &out, AnalysisContent &analysis, LinguisticAnalysisStructure::AnalysisGraph *anagraph, LinguisticAnalysisStructure::AnalysisGraph *posgraph, const Common::AnnotationGraphs::AnnotationData *annotationData, const SyntacticAnalysis::SyntacticData *syntacticData, const LinguisticGraphVertex begin, const LinguisticGraphVertex end, const FsaStringsPool &sp, const uint64_t offset) const
bool m_outputSentenceBoundaries
output sentence boundaries (enclosing sentence tags)
std::vector< std::string > m_featureTags
use additional vector (aligned) to store associated XML tags
BoWFeatures m_bowFeatures
use dedicated class for feature storage (easy initialization functions)
bool m_outputWords
output simple words
std::string xmlString(const std::string &str) const
virtual LimaStatusCode process(AnalysisContent &analysis) const override
Process on data in analysisContent.
std::vector< boost::shared_ptr< Common::BagOfWords::BoWToken > > checkCompound(LinguisticGraphVertex v, LinguisticAnalysisStructure::AnalysisGraph *anagraph, LinguisticAnalysisStructure::AnalysisGraph *posgraph, const Common::AnnotationGraphs::AnnotationData *annotationData, const SyntacticAnalysis::SyntacticData *syntacticData, uint64_t offset, std::set< LinguisticGraphVertex > &visited) const
std::deque< std::string > m_featureNames
use additional vector (aligned) to store feature names
void initializeFeatures(const std::map< std::string, std::string > &features, const std::deque< std::string > &featureOrder=std::deque< std::string >())
void xmlOutputVertex(std::ostream &out, AnalysisContent &analysis, LinguisticGraphVertex v, LinguisticAnalysisStructure::AnalysisGraph *anagraph, LinguisticAnalysisStructure::AnalysisGraph *posgraph, const Common::AnnotationGraphs::AnnotationData *annotationData, const SyntacticAnalysis::SyntacticData *syntacticData, const FsaStringsPool &sp, uint64_t offset, std::set< LinguisticGraphVertex > &visited, std::set< LinguisticGraphVertex > &alreadyStoredVertices) const
void xmlOutputVertexInfos(std::ostream &out, Lima::AnalysisContent &analysis, LinguisticGraphVertex v, Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph *graph, uint64_t offset) const
void xmlOutputCompound(std::ostream &out, AnalysisContent &analysis, boost::shared_ptr< Lima::Common::BagOfWords::AbstractBoWElement > token, Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph *anagraph, Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph *posgraph, const Lima::Common::AnnotationGraphs::AnnotationData *annotationData, const Lima::FsaStringsPool &sp, uint64_t offset) const
bool m_outputSpecificEntityParts
output parts of specific entities
bool m_outputCompoundParts
output also compound parts
std::string m_compoundTag
std::string specificEntityFeature(const SpecificEntities::SpecificEntityAnnotation *se, const std::string &featureName, const FsaStringsPool &sp, uint64_t offset) const
void xmlOutput(std::ostream &out, AnalysisContent &analysis, LinguisticAnalysisStructure::AnalysisGraph *anagraph, LinguisticAnalysisStructure::AnalysisGraph *posgraph, const Common::AnnotationGraphs::AnnotationData *annotationData, const SyntacticAnalysis::SyntacticData *syntacticData) const
virtual void init(Common::XMLConfigurationFiles::GroupConfigurationStructure &unitConfiguration, Manager *manager) override
std::pair< const SpecificEntities::SpecificEntityAnnotation *, LinguisticAnalysisStructure::AnalysisGraph * > checkSpecificEntity(LinguisticGraphVertex v, LinguisticAnalysisStructure::AnalysisGraph *anagraph, LinguisticAnalysisStructure::AnalysisGraph *posgraph, const Common::AnnotationGraphs::AnnotationData *annotationData) const
check if a vertex is a specific entity: returns the specific entity annotation if it is the case,...
bool m_outputCompounds
output compounds
bool m_outputAllCompounds
output all partial compounds (created using BoWToken iterator)
WordFeatures m_features
use dedicated class for feature storage (easy initialization functions)
void xmlOutputBoWInfos(std::ostream &out, Common::BagOfWords::AbstractBoWElement *token, uint64_t offset) const
Compounds::BowGenerator * m_bowGenerator
std::string m_sentenceBoundaryTag
std::map< std::string, std::string > m_defaultFeatures
bool xmlOutputSpecificEntity(std::ostream &out, AnalysisContent &analysis, const SpecificEntities::SpecificEntityAnnotation *se, LinguisticAnalysisStructure::AnalysisGraph *anagraph, const FsaStringsPool &sp, uint64_t offset) const
void replace(std::string &str, const std::string &toReplace, const std::string &newValue) const
bool m_outputSpecificEntities
output specific entities
Parameters retrived in the configuration file:
An AnalysisData containing a LinguisticGraph with a language and an id.
A representation of a specific entity to store in the annotation graph.
This class points to a graph, its dependency graph and the structure that holds the maping between th...