LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
XmlIEDumper.h
Go to the documentation of this file.
1// Copyright (C) 2004-2012 by CEA LIST *
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6#ifndef XMLIEDUMPERXMLIEDUMPER_H
7#define XMLIEDUMPERXMLIEDUMPER_H
8
10
11namespace Lima {
12namespace LinguisticProcessing {
13namespace AnalysisDumpers {
14
15#define XmlIEDUMPER_CLASSID "XmlIEDumper"
16
18{
19public:
21
22 virtual ~XmlIEDumper();
23
25 Manager* manager) override;
26
27 void outputGlobalHeader(std::ostream& os, const std::string& sourceFile="",
28 const LimaStringText& /*originalText*/=LimaStringText("")) const override;
29 void outputGlobalFooter(std::ostream& os) const override;
30 void outputEntitiesHeader(std::ostream& os) const override;
31 void outputEntitiesFooter(std::ostream& os) const override;
32 void outputRelationsHeader(std::ostream& os) const override;
33 void outputRelationsFooter(std::ostream& os) const override;
34 void outputEventsHeader(std::ostream& os) const override;
35 void outputEventsFooter(std::ostream& os) const override;
36
37 void outputEntityString(std::ostream& out,
38 unsigned int entityId,
39 const std::string& entityType,
40 const std::string& entityString,
41 const std::vector<std::pair<uint64_t,uint64_t> >& positions,
42 const Automaton::EntityFeatures& entityFeatures, bool noNorm=false) const override;
43
44 void outputAttributesString(std::ostream& out,
45 unsigned int entityId,
46 std::map <std::tuple <std::size_t, std::string , std::string >, std::size_t >& mapAttributes) const override;
47
48 unsigned int outputRelationString(std::ostream& out,
49 unsigned int relationId,
50 const std::string& relationType,
51 const std::string& sourceArgString,
52 const std::string& targetArgString) const override;
53
54 void outputEventString(std::ostream& out,
55 unsigned int eventId,
56 unsigned int eventMentionId,
57 const std::string& eventMentionType,
58 const std::vector<unsigned int>& eventRoleId,
59 const std::vector<std::string>& eventRoleType) const override;
60
61 void outputEntityNorm(std::ostream& out,
62 unsigned int entityId,
63 const std::string& entityNorm) const override;
64
65 // add event mention as a separate entity
66 bool addEventMentionAsEntity() const override { return false; }
67
68private:
69
70};
71
72} // AnalysisDumpers
73} // LinguisticProcessing
74} // Lima
75
76#endif
#define LIMA_ANALYSISDUMPERS_EXPORT
Manage initialization of InitializableObjects using configuration module and parameters.
a list of generic features: each feature is unique (only one feature for a name)
define the limaStringText resource which is the text in limaString formal
NAUTITIA.