LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
entityProperties.cpp
Go to the documentation of this file.
1// Copyright 2002-2020 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.cpp
9* Author : Besancon Romaric (besanconr@zoe.cea.fr)
10* Created on : Fri Jan 17 2003
11* Copyright : (c) 2003 by CEA
12* Version : $Id$
13*
14*************************************************************************/
15
16#include "entityProperties.h"
20
21using namespace std;
22
23namespace Lima {
24namespace LinguisticProcessing {
25namespace Automaton {
26
27
28/***********************************************************************/
29// constructors
30/***********************************************************************/
32 m_head(0),
33 m_type(),
34 m_features(),
35 m_contextual(true)
36{}
37
42
44{
45 if (this != &p)
46 {
47 copy(p);
48 }
49 return (*this);
50}
51
60
62{
63 if (p.getHead() != 0)
64 {
65 m_head = p.getHead();
66 }
67 else
68 {
69 m_head = 0;
70 }
71 m_type=p.m_type;
75}
76
77
78/***********************************************************************/
79// destructor
80/***********************************************************************/
84
85/***********************************************************************/
86// output
87/***********************************************************************/
89{
90 ostringstream oss;
91 if (m_head)
92 {
93 oss << "head=" << m_head << ";";
94 }
95 oss << "type=[" << m_type << "];";
97 {
98 oss << "lingProp=[" << m_linguisticProperties.toString() << "];";
99 }
100 oss << "norm=[" << m_features << "]"
101 << "contextual=[" << m_contextual << "]";
103}
104
105} // end namespace
106} // end namespace
107} // end namespace
std::string toString() const
Definition StdBitset.h:152
bool toBool() const noexcept
Definition StdBitset.h:99
EntityProperties & operator=(const EntityProperties &p)
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
bool m_contextual
if true, the expression is contextual (ambiguous and have to use the context to disambiguate))
LimaString utf8stdstring2limastring(const std::string &src)
NAUTITIA.
QString LimaString
Definition LimaString.h:33
STL namespace.