LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
entityProperties.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 entityProperties.h
9 * @author besancon (besanconr@zoe.cea.fr)
10 * @date Fri Jan 17 2003
11 * copyright Copyright (C) 2003 by CEA LIST
12 * Project Automaton
13 *
14 * @brief properties of a recognized specific entity (common to all types
15 * of results)
16 *
17 *
18 ***********************************************************************/
19
20#ifndef ENTITYPROPERTIES_H
21#define ENTITYPROPERTIES_H
22
23#include "AutomatonExport.h"
24#include <vector>
25#include "EntityFeatures.h"
29
30namespace Lima {
31namespace LinguisticProcessing {
32namespace Automaton {
33
35{
36 public:
40 EntityProperties& operator = (const EntityProperties& p);
41
42 //comparison operator
43 bool operator== (const EntityProperties& p);
44
45 LinguisticGraphVertex getHead() const;
46 const Common::MediaticData::EntityType& getType() const;
47 LinguisticCode getLinguisticProperties() const;
48
49 const EntityFeatures& features() const { return m_features; }
50 EntityFeatures& features() { return m_features; }
51
52 bool isContextual() const;
53
54 void setHead(const LinguisticGraphVertex& v);
55 void setType(const Common::MediaticData::EntityType& t);
56 void setLinguisticProperties(const LinguisticCode& lingProp);
57 void setContextual(const bool contextual);
58
59 LimaString str() const;
60
61 protected:
72 // copy the content of another entityProperties instance
73 void copy(const EntityProperties& p);
74
75};
76/***********************************************************************/
77// inline access functions
78/***********************************************************************/
88inline bool EntityProperties::isContextual() const {
89 return m_contextual;
90}
91/***********************************************************************/
92// modifiers
93/***********************************************************************/
96 m_head=v;
97}
104inline void EntityProperties::setContextual(const bool contextual) {
105 m_contextual=contextual;
106}
107
108} // end namespace
109} // end namespace
110} // end namespace
111
112#endif
#define LIMA_AUTOMATON_EXPORT
A graph structure for linguistic analysis.
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
a list of generic features: each feature is unique (only one feature for a name)
LinguisticGraphVertex m_head
indicates which token (in the original text) is the head of the recognized entity
Common::MediaticData::EntityType m_type
the type of the recognized entity
LinguisticCode m_linguisticProperties
associated ling prop
void setLinguisticProperties(const LinguisticCode &lingProp)
bool m_contextual
if true, the expression is contextual (ambiguous and have to use the context to disambiguate))
const Common::MediaticData::EntityType & getType() const
void setType(const Common::MediaticData::EntityType &t)
NAUTITIA.
QString LimaString
Definition LimaString.h:33