Collatinus  11.3
mot.h
Aller à la documentation de ce fichier.
1 /* mot.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 MOT_H
23 #define MOT_H
24 
25 #include <QString>
26 #include <QStringList>
27 #include <QMap>
28 #include <QtCore/QCoreApplication>
29 
30 #include "lemCore.h"
31 #include "lemme.h"
32 #include "ch.h"
33 
43 class Mot : public QObject
44 {
45  Q_OBJECT
46 public:
47  Mot(QString forme, int rang, bool debVers, QObject *parent = 0);
48  QString choisir(QString t = "", int np = 0, bool tout = true);
49  long proba(QString t);
50  QStringList tags();
51  QString forme();
52  QString tagEncl();
53  bool inconnu();
54  void setBestOf(QString t, double pr);
55  double bestOf(QString t);
56 
57 private:
59  QString _forme;
60  int _rang;
61  QString _tagEncl;
63  QStringList _lemmes;
64  QStringList _morphos;
65  QStringList _tags;
66  QList<int> _nbOcc;
67  QMap<QString,long> _probas;
68  QString _maxProb;
69  QMap<QString,double> _bestOf;
70 };
71 
72 #endif // MOT_H
QString _tagEncl
Definition: mot.h:61
QStringList _lemmes
Definition: mot.h:63
Mot(QString forme, int rang, bool debVers, QObject *parent=0)
Definition: mot.cpp:31
QList< int > _nbOcc
Definition: mot.h:66
bool inconnu()
Definition: mot.cpp:218
QMap< Lemme *, QList< SLem > > MapLem
Une MapLem regroupe par lemme les résultats d'une lemmatisation.
Definition: lemCore.h:67
QString _maxProb
Definition: mot.h:68
QStringList tags()
Definition: mot.cpp:223
QString tagEncl()
Definition: mot.cpp:213
QString choisir(QString t="", int np=0, bool tout=true)
Definition: mot.cpp:162
void setBestOf(QString t, double pr)
Definition: mot.cpp:241
QMap< QString, double > _bestOf
Definition: mot.h:69
QStringList _morphos
Definition: mot.h:64
long proba(QString t)
Definition: mot.cpp:229
QStringList _tags
Definition: mot.h:65
MapLem _mapLem
Definition: mot.h:62
QString _forme
Definition: mot.h:59
La classe LemCore est le noyau de lemmatisation.
Definition: lemCore.h:118
QMap< QString, long > _probas
Definition: mot.h:67
int _rang
Definition: mot.h:60
La classe Mot contient le mot et ses analyses possibles.
Definition: mot.h:43
QString forme()
Definition: mot.cpp:236
LemCore * _lemCore
Definition: mot.h:58
double bestOf(QString t)