Collatinus  11.3
flexion.h
Aller à la documentation de ce fichier.
1 /* flexion.h
2  *
3  * This file is part of COLLATINUS.
4  *
5  * COLLATINUS is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * COLLATINVS is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with COLLATINUS; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * © Yves Ouvrard, 2009 - 2016
20  */
21 
22 #ifndef FLEXION_H
23 #define FLEXION_H
24 
25 #include <QList>
26 #include <QRegExp>
27 
28 #include <QString>
29 #include <QStringList>
30 #include <QUrl>
31 
32 #include "lemCore.h"
33 #include "lemme.h"
34 
35 #define OMIS 1
36 #define PARENTH 3
37 
41 class Flexion : public QObject
42 {
43  Q_OBJECT
44 
45  private:
48  // constantes de table html :
49  QString const static entete;
50  QString const static lina;
51  QString const static linb;
52  QString const static linc;
53  QString const static queue;
54  // constantes d'affichage désinence
55  int const static omis = OMIS;
56  int const static parenth = PARENTH;
57  // menu
58  QString menuLem;
59  // construction des tableaux par pos
60  QString tabNom();
61  QString tabPron();
62  QString tabAdj();
63  QString tabAdv();
64  QString tabV();
65 
66  public:
67  Flexion(QObject *parent = 0);
68 // QStringList const static cas;
69  QString static entreParenth(QString e);
70 // QStringList const static genres;
71 // QStringList const static nombres;
72 // QStringList const static temps;
73  QString forme(int m, bool label = false);
74  QString static gras(QString g);
75 // QStringList menu();
76  void setLemme(Lemme *l);
77 // void setMenu(QStringList m);
78  QString tableau(Lemme *l);
79  QString tableaux(MapLem *ml);
80 // QString tableaux(MapLem ml);
81 };
82 
83 #endif
QMap< Lemme *, QList< SLem > > MapLem
Une MapLem regroupe par lemme les résultats d'une lemmatisation.
Definition: lemCore.h:67
QString static const linb
HTML pour séparer les cellules.
Definition: flexion.h:51
int static const omis
seuil de rareté pour que la forme n'apparaisse pas
Definition: flexion.h:55
QString static const entete
HTML pour le début du tableau.
Definition: flexion.h:49
QString tableaux(MapLem *ml)
Calcule les tableaux de chaque lemme de la MapLem ml (cf. lemCore.h), et renvoie leur concaténation...
Definition: flexion.cpp:163
static QString entreParenth(QString e)
Definition: flexion.cpp:68
La classe Flexion construit les tableaux de flexion d'un lemme.
Definition: flexion.h:41
static QString gras(QString g)
Utilitaire renvoyant g encadré des balises html et .
Definition: flexion.cpp:118
QString tabAdj()
Fonction spécialisée dans les adjectifs.
Definition: flexion.cpp:241
La classe Lemme décrit les lemmes.
Definition: lemme.h:64
Lemme * _lemme
pointeur de la classe Lemme pour le lemme dont on construit les tableaux de flexion ...
Definition: flexion.h:46
#define PARENTH
Definition: flexion.h:36
QString menuLem
liste des lemmes présents dans la page
Definition: flexion.h:58
QString tabV()
Fonction spécialisée dans les verbes.
Definition: flexion.cpp:329
#define OMIS
Definition: flexion.h:35
La classe LemCore est le noyau de lemmatisation.
Definition: lemCore.h:118
QString forme(int m, bool label=false)
Renvoie entre virgules les formes dont morphologie occupe de rang n dans la liste des morphologies du...
Definition: flexion.cpp:80
QString tabPron()
Fonction spécialisée dans les pronoms.
Definition: flexion.cpp:205
Flexion(QObject *parent=0)
Constructeur de la classe Flexion.
Definition: flexion.cpp:36
void setLemme(Lemme *l)
Attribue le lemme l à l'objet Flexion. Aucun tableau ne peut être calculé avant que cette fonction ai...
Definition: flexion.cpp:129
QString static const lina
HTML pour le début de ligne.
Definition: flexion.h:50
QString static const linc
HTML pour la fin de ligne.
Definition: flexion.h:52
LemCore * _lemCore
pointeur vers le noyau de lemmatisation, LemCore
Definition: flexion.h:47
QString static const queue
HTML pour la fin du tableau.
Definition: flexion.h:53
QString tableau(Lemme *l)
Renvoie le tableau de flexion de l. Cette fonction se contente d'appeler la fonction spécialisée corr...
Definition: flexion.cpp:141
QString tabNom()
Fonction spécialisée dans les noms.
Definition: flexion.cpp:187
int static const parenth
seuil de rareté pour que la forme soit entre parenthèses
Definition: flexion.h:56
QString tabAdv()
Fonction spécialisée dans les adverbes.
Definition: flexion.cpp:310