LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
EasyDumper.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
21#ifndef LIMA_LINGUISTICPROCESSINGS_ANALYSISDUMPERS_EASYXMLDUMPER_EASYDUMPER_H
22#define LIMA_LINGUISTICPROCESSINGS_ANALYSISDUMPERS_EASYXMLDUMPER_EASYDUMPER_H
23
25
26#include <string>
27#include <map>
28#include <set>
29
30namespace Lima {
31namespace LinguisticProcessing {
32namespace AnalysisDumpers {
33namespace EasyXmlDumper {
34
36{
37
38public:
39
41 const std::map<std::string,std::string>& relationTypeMapping,
42 const std::map<std::string,std::string>& srcVxTag,
43 const std::map<std::string,std::string>& tgtVxTag,
44 const std::string& enonceId);
45
47
48 void dump(std::ostream& out);
49
50private:
51
52 typedef std::pair<Chaine,std::vector<Forme> > Constituant;
53
54 std::string m_enonceId;
55 std::map<std::string,std::string> m_relationTypeMapping;
56 std::map<std::string,std::string> m_srcVxTag;
57 std::map<std::string,std::string> m_tgtVxTag;
58
59 std::map<Chaine,std::vector<uint64_t> > m_chaines;
60 std::map<uint64_t,uint64_t> m_vertexToFormeIds;
61 std::map<uint64_t,Forme*> m_formesIndex;
62 std::vector<Relation*> m_relations;
63 std::vector<Relation*> m_inRelations;
64 std::vector<Constituant> m_constituants;
65
66 std::map<Chaine,std::string> m_chaineIds;
67 std::map<uint64_t,std::string> m_formesIds;
68 std::map<Relation*,std::string> m_relationsIds;
69
71 std::map<uint64_t, Groupe> m_groupes;
72
73 std::map<uint64_t, std::string> m_groupeIdGroupStr;
74
76 std::map<uint64_t, Groupe*> m_formesIdsGroupsIds;
77
78 std::map< uint64_t, uint64_t > m_positionsFormsIds;
79 std::set< uint64_t > m_inGroupFormsPositions;
80
81 void dumpConstituants(std::ostream& out);
82 void dumpRelations(std::ostream& out);
83 void computeFormeIds();
84
85};
86
87} // end namespace EasyXmlDumper
88} // end namespace AnalysisDumpers
89} // end namespace LinguisticProcessings
90} // end namespace Lima
91
92#endif // LIMA_LINGUISTICPROCESSINGS_ANALYSISDUMPERS_EASYXMLDUMPER_EASYDUMPER_H
extracts forms and relations from boost graph (origninally, from XML file)
NAUTITIA.