LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
EventTemplateData.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 *
8 * @file EventTemplateData.h
9 * @author Romaric Besancon (romaric.besancon@cea.fr)
10 * @date Fri Sep 2 2011
11 * copyright Copyright (C) 2011 by CEA LIST
12 * Project LIMA
13 *
14 * @brief AnalysisData storing the result of event template filling
15 *
16 *
17 ***********************************************************************/
18
19#ifndef EVENTTEMPLATEDATA_H
20#define EVENTTEMPLATEDATA_H
21
22#include "EventAnalysisExport.h"
23#include "EventTemplate.h"
25
26namespace Lima {
27namespace LinguisticProcessing {
28namespace EventAnalysis {
29
30class Events;
31class Entity;
32
33class LIMA_EVENTANALISYS_EXPORT EventTemplateData : public AnalysisData, public std::vector<EventTemplate>
34{
35 public:
38
39 void addTemplate();
40 void addElementInCurrentTemplate(const std::string& role, const EventTemplateElement& elt, unsigned int cardinality);
41 void clearCurrentTemplate();
42 void setTypeInCurrentTemplate(const std::string&);
43
44 Events* convertToEvents(const Common::AnnotationGraphs::AnnotationData* annotationData) const;
45
46 private:
47 // private member functions
48 Entity* createEntity(const LinguisticAnalysisStructure::AnalysisGraph* graph,
50 const Common::AnnotationGraphs::AnnotationData* annotationData,
51 const std::string& role,
52 uint64_t eventId) const;
53};
54
56{
57 public:
58 EventTemplateDefinitionData(std::shared_ptr<EventTemplateDefinitionResource> r) : resource(r) {}
59 // no destructor to free the pointer : the pointer is on an external resource
60 std::shared_ptr<EventTemplateDefinitionResource> resource;
61};
62
63} // end namespace
64} // end namespace
65} // end namespace
66
67#endif
#define LIMA_EVENTANALISYS_EXPORT
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
just for semantics: base class for analysisData
Holds an annotation graph and gives an API to manipulate it.
EventTemplateDefinitionData(std::shared_ptr< EventTemplateDefinitionResource > r)
std::shared_ptr< EventTemplateDefinitionResource > resource
An AnalysisData containing a LinguisticGraph with a language and an id.
NAUTITIA.