LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
BratDumper.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 BRATDUMPERBRATDUMPER_H
7#define BRATDUMPERBRATDUMPER_H
8
10
11namespace Lima {
12namespace LinguisticProcessing {
13namespace AnalysisDumpers {
14
15#define BRATDUMPER_CLASSID "BratDumper"
16
18{
19public:
20 BratDumper();
21 virtual ~BratDumper();
22
24 Manager* manager) override;
25
26 void outputEntityString(std::ostream& out,
27 unsigned int entityId,
28 const std::string& entityType,
29 const std::string& entityString,
30 const std::vector<std::pair<uint64_t,uint64_t> >& positions,
31 const Automaton::EntityFeatures& entityFeatures,
32 bool noNorm=false) const override;
33
34 void outputAttributesString(std::ostream& out,
35 unsigned int entityId,
36 std::map <std::tuple <std::size_t, std::string , std::string >, std::size_t >& mapAttributes) const override;
37
38 unsigned int outputRelationString(std::ostream& out,
39 unsigned int relationId,
40 const std::string& relationType,
41 const std::string& sourceArgString,
42 const std::string& targetArgString) const override;
43
44 void outputEventString(std::ostream& out,
45 unsigned int eventId,
46 unsigned int eventMentionId,
47 const std::string& eventMentionType,
48 const std::vector<unsigned int>& eventRoleId,
49 const std::vector<std::string>& eventRoleType) const override;
50
51 void outputEntityNorm(std::ostream& out,
52 unsigned int entityId,
53 const std::string& entityNorm) const override;
54
55
56 // add event mention as a separate entity
57 //bool addEventMentionAsEntity() const override { return true; }
58 bool addEventMentionAsEntity() const override { return false; }
59
60private:
61 bool m_useNormalizedForms; //<! use normalized forms instead of surface forms (!! careful, the format is not compatible with brat any more)
62};
63
64} // AnalysisDumpers
65} // LinguisticProcessing
66} // Lima
67
68#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)
NAUTITIA.