Debian Codegraph @

src/lemme.h

raw symbols SCIP
1 /* lemme.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 LEMME_H
23 #define LEMME_H
24
25 #include <QMultiMap>
26 #include <QObject>
27 #include <QString>
28 #include "irregs.h"
29 #include "lemmatiseur.h"
30 #include "modele.h"
31
32 class Irreg;
33 class Lemmat;
34 class Lemme;
35 class Modele;
36
37 class Radical : public QObject
38 {
39 private:
40 QString _gr;
41 QString _grq;
42 Lemme* _lemme;
43 int _numero;
44
45 public:
46 Radical(QString g, int n, QObject* parent);
47 QString gr();
48 QString grq();
49 Lemme* lemme();
50 Modele* modele();
51 int numRad();
52 };
53
54 class Lemme : public QObject
55 {
56 Q_OBJECT
57 private:
58 QString _cle;
59 int _freq;
60 QString _genre;
61 QString _gr;
62 QString _grd;
63 QString _grq;
64 QString _grModele;
65 QString _hyphen; // Pour les césures étymologies
66 QString _indMorph;
67 QList<Irreg*> _irregs;
68 QStringList _lexSynt;
69 Modele* _modele;
70 int _nh;
71 Lemmat* _lemmatiseur;
72 QList<int> _morphosIrrExcl;
73 QStringList _morphoSynt;
74 int _origin; // lemmes ou lem_ext
75 QString _pos;
76 QMap<int,QList<Radical*> > _radicaux;
77 QString _renvoi;
78 QMap<QString,QString> _traduction;
79
80 public:
81 Lemme(QString linea, int origin, QObject* parent);
82 void ajIrreg(Irreg* irr);
83 void ajRadical(int i, Radical* r);
84 void ajTrad(QString t, QString l);
85 QString cle();
86 QList<int> clesR();
87 bool estIrregExcl(int nm);
88 int freq() const;
89 QString genre();
90 QString gr();
91 QString grq();
92 QString grModele();
93 QString humain(bool html = false, QString l = "fr");
94 Modele* modele();
95 int origin();
96 QString static oteNh(QString g, int& nh);
97 QString pos();
98 QList<Radical*> radical(int r);
99 QString renvoi();
100 void setLexSynt(QStringList m);
101 void setPos(QString p);
102 bool synt(QString s);
103 QString traduction(QString l="fr");
104 QString traduction(QString l, QString pos);
105 QString traduction(QString l, QChar pos);
106 };
107
108 inline bool operator<(const Lemme &lg, const Lemme &ld);
109
110 #endif