LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
SemanticAnnotation.cpp
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 SemanticAnnotation.cpp
9 * @author (romaric.besancon@cea.fr)
10 * @date Thu Sep 13 2007
11 * copyright Copyright (C) 2007 by CEA LIST
12 *
13 ***********************************************************************/
14
15#include "SemanticAnnotation.h"
16
17namespace Lima {
18namespace LinguisticProcessing {
19namespace SemanticAnalysis {
20
21std::ostream& operator << (std::ostream& os, const SemanticAnnotation& annot) {
22 return os << "SemanticAnnotation("<< annot.m_type << ")";
23}
24
26{
28 try
29 {
31 return SUCCESS_ID;
32 }
33 catch (const boost::bad_any_cast& e)
34 {
35 LERROR << "This annotation is not a SemanticAnnotation ; nothing dumped";
36 return UNKNOWN_ERROR;
37 }
38}
39
40} // end namespace
41} // end namespace
42} // end namespace
#define LERROR
Definition LimaCommon.h:161
#define PROCESSORSLOGINIT
Definition LimaCommon.h:211
This class allows to convert any object into an annotation by inheritance.
virtual int dump(std::ostream &os, Common::AnnotationGraphs::GenericAnnotation &ga) const override
std::ostream & operator<<(std::ostream &os, const SemanticAnnotation &annot)
NAUTITIA.
@ UNKNOWN_ERROR
Definition LimaCommon.h:238
@ SUCCESS_ID
Definition LimaCommon.h:237