LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
lemmaTransition.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 lemmaTransition.h
9 * @author besancon (besanconr@zoe.cea.fr)
10 * @date Wed Nov 13 2002
11 * copyright Copyright (C) 2002 by CEA LIST
12 * Project Automaton
13 *
14 * @brief transitions that are normalized forms : lemma
15 *
16 *
17 ***********************************************************************/
18
19#ifndef LEMMATRANSITION_H
20#define LEMMATRANSITION_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 LemmaTransition(const Tword, const Tpos,
35 const Common::PropertyCode::PropertyAccessor* macroAccessor,
36 const Common::PropertyCode::PropertyAccessor* microAccessor,
37 bool keep=true);
39 virtual ~LemmaTransition();
40 LemmaTransition& operator = (const LemmaTransition&);
41
42 LemmaTransition* clone() const override;
43 LemmaTransition* 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 Tword lemma() const;
57 LimaString lemmaString(const FsaStringsPool& sp) const;
58 void setLemma(const Tword&);
59 Tpos partOfSpeech() const;
60 void setPartOfSpeech(const Tpos&);
61
62 private:
63 Tword m_lemma;
64 Tpos m_pos;
65 const Common::PropertyCode::PropertyAccessor* m_macroAccessor;
66 const Common::PropertyCode::PropertyAccessor* m_microAccessor;
67
68};
69
70
71/***********************************************************************/
72// inline access functions
73/***********************************************************************/
74inline Tword LemmaTransition::lemma() const { return m_lemma; }
75inline void LemmaTransition::setLemma(const Tword& s) { m_lemma = s; }
76inline Tpos LemmaTransition::partOfSpeech() const { return m_pos; }
77inline void LemmaTransition::setPartOfSpeech(const Tpos& p) { m_pos = p; }
79
81 return new LemmaTransition(*this); }
83 return new LemmaTransition(); }
84
85} // namespace end
86} // namespace end
87} // namespace end
88
89#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.
QString LimaString
Definition LimaString.h:33