LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
BoWPredicate.h
Go to the documentation of this file.
1// Copyright 2014 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6/************************************************************************
7 * @file BoWPredicate.h
8 * @author Gael de Chalendar
9 * @date Mon Jul 7 2014
10 * copyright Copyright (C) 2014 by CEA LIST
11 ***********************************************************************/
12
13#ifndef BOWPREDICATE_H
14#define BOWPREDICATE_H
15
19
20#include <boost/shared_ptr.hpp>
21
22namespace Lima {
23namespace Common {
24namespace BagOfWords {
25
26class BoWPredicatePrivate;
33{
34 friend class BoWPredicatePrivate;
35public:
41 boost::shared_ptr< AbstractBoWElement > > pRoles);
42
43 virtual ~BoWPredicate();
44
47 virtual uint64_t size(void) const override {return 0;};
48
49 virtual BoWPredicate* clone() const override;
50
51 BoWPredicate& operator=(const BoWPredicate&);
52 bool operator==(const BoWPredicate&);
53
54 MediaticData::EntityType getPredicateType(void) const;
55 void setPredicateType(const MediaticData::EntityType&);
56
57 virtual BoWType getType() const override { return BoWType::BOW_PREDICATE; }
58
59 virtual Lima::LimaString getString(void) const override;
60
61 virtual uint64_t getPosition(void) const override;
62 virtual uint64_t getLength(void) const override;
63 virtual void setPosition(const uint64_t pos) override;
64 virtual void setLength(const uint64_t len) override;
65
67 virtual std::string getOutputUTF8String(const Common::PropertyCode::PropertyManager* macroManager = 0) const override;
68 virtual std::string getIdUTF8String(void) const override;
69
70 const QMultiMap<Common::MediaticData::EntityType, boost::shared_ptr< AbstractBoWElement > >& roles() const;
71 QMultiMap<Common::MediaticData::EntityType, boost::shared_ptr< AbstractBoWElement > >& roles();
72
73 void setRoles(QMultiMap<Common::MediaticData::EntityType, boost::shared_ptr< Common::BagOfWords::AbstractBoWElement > >& pRoles);
74
80 virtual std::set< uint64_t > getVertices() const override;
81
82
83protected:
85
86private:
88};
89
90
91} // namespace BagOfWords
92} // namespace Common
93} // namespace Lima
94
95#endif
#define LIMA_BOW_EXPORT
This class is the abstract base class of all elements that can be stored in a BoWText.
This is a BoW element used to represent a predicate (n-ary relation, template or semantic frame).
virtual BoWType getType() const override
virtual uint64_t size(void) const override
size of the AbstractBoWElement is the number of parts in the token, 0 for a predicate
Provide tools to manage a specific property.
BoWType
enum to characterize the type of the AbstractBoWElement
NAUTITIA.
QString LimaString
Definition LimaString.h:33