LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
posTransition.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 posTransition.h
9 * @author besancon (besanconr@zoe.cea.fr)
10 * @date Mon Oct 14 2002
11 * copyright Copyright (C) 2002 by CEA LIST
12 * Project Automaton
13 *
14 * @brief representation of POS transitions : the transitions are
15 * Parts-Of-Speech
16 *
17 ***********************************************************************/
18
19#ifndef POSTRANSITION_H
20#define POSTRANSITION_H
21
22#include "AutomatonExport.h"
23#include "automatonCommon.h"
24#include "transitionUnit.h"
25
26namespace Lima {
27namespace LinguisticProcessing {
28namespace Automaton {
29
31{
32 public:
34 PosTransition(const Tpos&,
35 const Common::PropertyCode::PropertyAccessor* macroAccessor,
36 const Common::PropertyCode::PropertyAccessor* microAccessor,
37 bool keep=true);
39 virtual ~PosTransition();
40 PosTransition& operator = (const PosTransition&);
41
42 PosTransition* clone() const override;
43 PosTransition* create() const override;
44
45 std::string printValue() const override;
46 bool operator== (const TransitionUnit&) const override;
47
48 bool compare(const LinguisticAnalysisStructure::AnalysisGraph& graph,
49 const LinguisticGraphVertex& vertex,
50 AnalysisContent& analysis,
52 const LinguisticAnalysisStructure::MorphoSyntacticData* data) const override;
53
54 TypeTransition type() const override;
55
56 Tpos pos() const;
57 void setPos(Tpos);
58 // bool comparePos(const LinguisticCode& pos) const;
59
60 private:
61 Tpos m_pos;
62 const Common::PropertyCode::PropertyAccessor* m_macroAccessor;
63 const Common::PropertyCode::PropertyAccessor* m_microAccessor;
64
65};
66
67/***********************************************************************/
68// inline access functions
69/***********************************************************************/
70inline Tpos PosTransition::pos() const { return m_pos; }
71inline void PosTransition::setPos(Tpos s) { m_pos = s; }
72inline TypeTransition PosTransition::type() const { return T_POS; }
73
74
76 return new PosTransition(*this); }
78 return new PosTransition(); }
79
80} // namespace end
81} // namespace end
82} // namespace end
83
84#endif
#define LIMA_AUTOMATON_EXPORT
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
Provide function to read write and check a property.
An AnalysisData containing a LinguisticGraph with a language and an id.
NAUTITIA.