LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
TextFeaturesDumper.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/************************************************************************
7 * @author Romaric Besancon (romaric.besancon@cea.fr)
8 * @date Mon Feb 7 2011
9 * @brief a dumper that outputs tab-separated word features, one word per line
10 ***********************************************************************/
11#ifndef LIMA_LINGUISTICPROCESSING_ANALYSISDUMPERSTEXTFEATURESDUMPER_H
12#define LIMA_LINGUISTICPROCESSING_ANALYSISDUMPERSTEXTFEATURESDUMPER_H
13
16
18
22
24
25namespace Lima {
26namespace LinguisticProcessing {
27namespace AnalysisDumpers {
28
29#define TEXTFEATURESDUMPER_CLASSID "TextFeaturesDumper"
30
32{
33public:
35 virtual ~TextFeaturesDumper();
36
38 Manager* manager) override;
39
40 LimaStatusCode process(AnalysisContent& analysis) const override;
41
42private:
43 std::string m_graph; /*< name of the graph */
44 std::string m_sep; /*< separator between features */
45 std::string m_sepReplace; /*< character to replace separator in feature strings */
46 std::string m_sepPOS; /*< separator between POS */
47 WordFeatures m_features; /* list of features */
48
49 // private member functions
50 void outputVertex(std::ostream& out,
53 AnalysisContent& analysis,
54 uint64_t offset=0) const;
55};
56
57struct lTokenPosition
58{
60 {
61 if (f1->position()!=f2->position()) return f1->position()<f2->position();
62 return f1->length()<f2->length();
63 }
64};
65
66}
67
68}
69
70}
71
72#endif
#define LIMA_ANALYSISDUMPERS_EXPORT
A graph structure for linguistic analysis.
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
Manage initialization of InitializableObjects using configuration module and parameters.
An AnalysisData containing a LinguisticGraph with a language and an id.
NAUTITIA.
LimaStatusCode
Definition LimaCommon.h:236
bool operator()(const LinguisticAnalysisStructure::Token *f1, const LinguisticAnalysisStructure::Token *f2) const