LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
EventTemplateElement.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 EventTemplateElement.cpp
9 * @author Romaric Besancon (romaric.besancon@cea.fr)
10 * @date Fri Sep 2 2011
11 * copyright Copyright (C) 2011 by CEA LIST
12 *
13 ***********************************************************************/
14
17
18namespace Lima {
19namespace LinguisticProcessing {
20namespace EventAnalysis {
21
23m_type(),
24m_graph(0),
25m_vertex(0)
26{
27}
28
32m_type(type),
33m_graph(graph),
34m_vertex(v)
35{
36}
37
38
41
47
49{
51 if (tok) {
52 return tok->position();
53 }
54 return 0;
55}
56
58{
60 if (tok) {
61 return tok->position()+tok->length();
62 }
63 return 0;
64}
65
66
68{
71 // for the moment, simple equality of string
72 return (tok->stringForm()==otherTok->stringForm());
73}
74
75
76// output utility
77std::ostream& operator<<(std::ostream& os, const EventTemplateElement& elt)
78{
80 if (tok!=0) {
82 }
83 return os;
84}
85QDebug& operator<<(QDebug& os, const EventTemplateElement& elt)
86{
88 if (tok!=0) {
89 os << tok->stringForm();
90 }
91 return os;
92}
93
94
95
96} // end namespace
97} // end namespace
98} // end namespace
@ vertex_token
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
An AnalysisData containing a LinguisticGraph with a language and an id.
const LinguisticGraph * getGraph(void) const
Returns the underlying graph structure.
std::string limastring2utf8stdstring(const Lima::LimaString &phrase, uint32_t size0)
Convert a wide string to a string , in dest up to size bytes.
std::ostream & operator<<(std::ostream &os, const Entity &annot)
Definition Entity.cpp:160
NAUTITIA.