LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
SimplificationConstraints.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
19#ifndef LIMA_SYNTACTICANALYSIS_SIMPLIFICATIONCONSTRAINTS_H
20#define LIMA_SYNTACTICANALYSIS_SIMPLIFICATIONCONSTRAINTS_H
21
26
27#include <iostream>
28
29namespace Lima {
30namespace LinguisticProcessing {
31namespace SyntacticAnalysis {
32
33//**********************************************************************
34// ids of constraints defined in this file
35#define SubsentenceBoundsId "SubsentenceBounds"
36#define SimplifyId "Simplify"
37#define ClearStoredSubsentencesId "ClearStoredSubsentences"
38
39//**********************************************************************
41{
42public:
43 explicit SubsentenceBounds(MediaId language,
44 const LimaString& complement=LimaString());
46
48 const LinguisticGraphVertex& v,
49 AnalysisContent& analysis) const override;
51 const LinguisticGraphVertex& v1,
52 const LinguisticGraphVertex& v2,
53 AnalysisContent& analysis) const override;
54private:
55 uint64_t m_language;
56};
57
58
59
61{
62public:
63 explicit Simplify(MediaId language,
64 const LimaString& complement=LimaString());
66
67 bool operator()(Automaton::RecognizerMatch& /*unused*/,
68 AnalysisContent& analysis) const override;
69
70 bool actionNeedsRecognizedExpression() override { return true; }
71
72private:
73 uint64_t m_language;
74};
75
77{
78public:
79 explicit ClearStoredSubsentences(MediaId language,
80 const LimaString& complement=LimaString());
82
83 bool operator()(AnalysisContent& analysis) const override;
84
85};
86
87
88} // end namespace SyntacticAnalysis
89} // end namespace LinguisticProcessing
90} // end namespace Lima
91
92#endif // LIMA_SYNTACTICANALYSIS_SIMPLIFICATIONCONSTRAINTS_H
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
#define LIMA_SYNTACTICANALYSIS_EXPORT
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
An AnalysisData containing a LinguisticGraph with a language and an id.
Abstract constraint function that takes a complement string that represents a relation name (entity t...
NAUTITIA.
QString LimaString
Definition LimaString.h:33