Collatinus  11.3
scandeur.h
Aller à la documentation de ce fichier.
1 /* scandeur.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 SCANDEUR
23 #define SCANDEUR
24 
25 #include <QDebug>
26 
27 #include "ch.h"
28 #include "lemCore.h"
29 
49 class Scandeur : public QObject
50 {
51 public:
52  Scandeur(QObject *parent = 0, LemCore *l=0, QString resDir="");
53  // Pour scander, un texte.
54  QString parPos(QString f);
55  QString scandeTxt(QString texte, int accent = 0, bool stats = false, bool majAut = false);
56  QString txt2csv(QString texte, int accent = 9, bool majAut = false);
57 
58 private:
62  QString _resDir;
64  QList<Reglep> _reglesp;
65  void lisParPos();
66  QStringList cherchePieds(int nbr, QString ligne, int i, bool pentam);
67  QStringList formeq(QString forme, bool *nonTrouve, bool debPhr,
68  int accent = 0);
69  QString code(QString PC, int accent);
70 };
71 
72 #endif // SCANDEUR
73 
void lisParPos()
Lecture des règles de quantité par position.
Definition: scandeur.cpp:136
QString parPos(QString f)
détermine les quantités par position.
Definition: scandeur.cpp:182
La classe Scandeur regroupe les fonctions nécessaires à la scansion et à l'accentuation des formes ou...
Definition: scandeur.h:49
QStringList formeq(QString forme, bool *nonTrouve, bool debPhr, int accent=0)
Scande ou accentue une forme.
Definition: scandeur.cpp:414
LemCore * _lemCore
Un pointeur vers le noyau de lemmatisation qui peut être partagé.
Definition: scandeur.h:60
QString scandeTxt(QString texte, int accent=0, bool stats=false, bool majAut=false)
Scande ou accentue le texte.
Definition: scandeur.cpp:548
Scandeur(QObject *parent=0, LemCore *l=0, QString resDir="")
Créateur de la classe pour scander des textes.
Definition: scandeur.cpp:93
QList< Reglep > _reglesp
La liste des règles pour déterminer les quantités par position.
Definition: scandeur.h:64
QString _resDir
Le nom du répertoire contenant les données.
Definition: scandeur.h:62
La classe LemCore est le noyau de lemmatisation.
Definition: lemCore.h:118
QString code(QString PC, int accent)
Détermine le nombre de syllabes et la nature (paroxyton ou proparoxyton) du mot.
Definition: scandeur.cpp:1131
QStringList cherchePieds(int nbr, QString ligne, int i, bool pentam)
Recherche de dactyles et de spondées dans le schéma métrique d'un vers.
Definition: scandeur.cpp:269
QString txt2csv(QString texte, int accent=9, bool majAut=false)
Transforme un texte en CSV.
Definition: scandeur.cpp:869