use strict;
use Getopt::Long;
use List::Util qw( max );
my %Symboles = ("'"=> 0, "-"=> 0, "_"=> 0, "'"=> 0, "\""=> 0, "\\"=> 0, "/"=> 0, "|"=> 0, "«"=> 0, "»"=> 0, "°"=> 0, ","=> 0, ";
"=> 0, "."=> 0, "`"=> 0, ":"=> 0, "~"=> 0, "{"=> 0, "}"=> 0, "["=> 0, "]"=> 0, "("=> 0, ")"=> 0, "+"=> 0, "="=> 0, "<"=> 0, ">"=> 0, "*"=> 0, "²"=> 0, "³"=> 0, "?"=> 0, "%"=> 0, "\$"=> 0, "@"=> 0, "±"=> 0, "^"=> 0, "¨"=> 0, "¯"=> 0, "0"=> 0, "9"=> 0, "8"=> 0, "7"=> 0, "6"=> 0, "5"=> 0, "4"=> 0, "3"=> 0, "2"=> 0, "1"=> 0, );
my %Voyelles = ("a"=> 0, "à"=> 0, "â"=> 0, "ä"=> 0, "á"=> 0, "e"=> 0, "è"=> 0, "é"=> 0, "ê"=> 0, "ë"=> 0, "i"=> 0, "î"=> 0, "ï"=> 0, "ì"=> 0, "í"=> 0, "o"=> 0, "ô"=> 0, "ö"=> 0, "ò"=> 0, "ó"=> 0, "u"=> 0, "û"=> 0, "ü"=> 0, "ù"=> 0, "ú"=> 0, "y"=> 0, "A"=> 0, "E"=> 0, "I"=> 0, "O"=> 0, "U"=> 0, "Y"=> 0, );
my %Consonnes = ("b"=> 0, "c"=> 0, "ç"=> 0, "d"=> 0, "f"=> 0, "g"=> 0, "h"=> 0, "j"=> 0, "k"=> 0, "l"=> 0, "m"=> 0, "n"=> 0, "p"=> 0, "q"=> 0, "r"=> 0, "s"=> 0, "t"=> 0, "v"=> 0, "w"=> 0, "x"=> 0, "z"=> 0, "B"=> 0, "C"=> 0, "D"=> 0, "F"=> 0, "G"=> 0, "H"=> 0, "J"=> 0, "K"=> 0, "L"=> 0, "M"=> 0, "N"=> 0, "P"=> 0, "Q"=> 0, "R"=> 0, "S"=> 0, "T"=> 0, "V"=> 0, "W"=> 0, "X"=> 0, "Z"=> 0, );
my $recueilFile;
if ( !GetOptions ( 'recueil=s' => \$recueilFile ) ) { print "!!! Erreur dans la lecture de la ligne de commande\n";
exit(-1);
} if ( !defined $recueilFile ) { print "!!! Aucun fichier spécifié (option -recueil) !!\n";
exit(-1);
} my %Recueil;
my %Mots;
print "\nOuverture du recueil...\n";
open fREC, "<$recueilFile" or die "Impossible d'ouvrir le recueil !\n";
# print "\n\nPremier passage...\n\n";
&premierPassage;
close fREC;
# print "\n\nDeuxième passage...\n\n";
my %Poetivites;
open fREC, "<$recueilFile" or die "Impossible d'ouvrir le recueil !\n";
my $logFile;
if($recueilFile =~ m/^(\S+)\.\w+$/) { $logFile = $1;
} else { $logFile = $recueilFile;
} $logFile .= "_log.txt";
open fLOG, ">$logFile" or die "Impossible de créer le fichier log !\n";
&deuxiemePassage;
close fREC;
close fLOG;
sub poedilation { my $poeme = $_[0];
my $degre = $_[1];
open fPOE, ">" . $poeme . ".txt" or die "Impossible d'ouvrir le fichier $poeme.txt !\n";
open fPTE, ">" . $poeme . "_pte.txt" or die "Impossible d'ouvrir le fichier $poeme.txt !\n";
foreach my $ligne (sort( {$a <=> $b} keys(%{$SampledRecueil{$poeme}}))) {
if(scalar(@{$SampledRecueil{$poeme}{$ligne}{"mots"}}) == 0) { print fPOE "\n";
next;
}
if(scalar(@{$SampledRecueil{$poeme}{$ligne}{"mots"}}) == 1) { print fPOE ${$SampledRecueil{$poeme}{$ligne}{"mots"}}[0] . "\n";
print fPTE ${$SampledRecueil{$poeme}{$ligne}{"poetivites"}}[0] . "\n";
next;
}
my @finalLine;
my @finalPoe;
for (my $i = 0 ;
$i < $degre ;
$i++) {
my @newLine;
my @newPoetivites;
while(scalar(@{$SampledRecueil{$poeme}{$ligne}{"mots"}}) > 1) {
my $motAvant = shift(@{$SampledRecueil{$poeme}{$ligne}{"mots"}});
my $poeAvant = shift(@{$SampledRecueil{$poeme}{$ligne}{"poetivites"}});
my $interpol = int(($poeAvant + ${$SampledRecueil{$poeme}{$ligne}{"poetivites"}}[0]) / 2);
if(exists($Poetivites{$poeme}{$interpol})) {
push(@newLine,${$Poetivites{$poeme}{$interpol}}[int(rand(scalar(@{$Poetivites{$poeme}{$interpol}})))]);
push(@newPoetivites,$interpol);
next;
}
if(exists($Poetivites{$poeme}{$interpol-1})) {
push(@newLine,${$Poetivites{$poeme}{$interpol-1}}[int(rand(scalar(@{$Poetivites{$poeme}{$interpol-1}})))]);
push(@newPoetivites,$interpol-1);
next;
}
if(exists($Poetivites{$poeme}{$interpol+1})) {
push(@newLine,${$Poetivites{$poeme}{$interpol+1}}[int(rand(scalar(@{$Poetivites{$poeme}{$interpol+1}})))]);
push(@newPoetivites,$interpol+1);
next;
}
my @poetivikeys = sort( {$a <=> $b} keys(%{$Poetivites{"recueil"}}));
my $avant = $poetivikeys[0];
my $apres = 0;
foreach my $poetivitest (@poetivikeys) {
next if($poetivitest == $avant);
if($poetivitest > $interpol) { $apres = $poetivitest;
last;
} $avant = $poetivitest;
}
if(($interpol - $avant) > ($apres - $interpol)) { push(@newLine,${$Poetivites{"recueil"}{$apres}}[int(rand(scalar(@{$Poetivites{"recueil"}{$apres}})))]);
push(@newPoetivites,$apres);
} else { push(@newLine,${$Poetivites{"recueil"}{$avant}}[int(rand(scalar(@{$Poetivites{"recueil"}{$avant}})))]);
push(@newPoetivites,$avant);
}
}
if(scalar(@{$SampledRecueil{$poeme}{$ligne}{"mots"}}) > 0) { push(@newLine,shift(@{$SampledRecueil{$poeme}{$ligne}{"mots"}}));
push(@newPoetivites,shift(@{$SampledRecueil{$poeme}{$ligne}{"poetivites"}}));
} @{$SampledRecueil{$poeme}{$ligne}{"mots"}} = @newLine;
@finalLine = @newLine;
@{$SampledRecueil{$poeme}{$ligne}{"poetivites"}} = @newPoetivites;
@finalPoe = @newPoetivites;
}
foreach my $motfinal (@finalLine) { print fPOE $motfinal . " ";
} foreach my $poefinale (@finalPoe) { print fPTE $poefinale . " ";
} print fPOE "\n";
print fPTE "\n";
}
print "\n\npoedilation OK ! (voir " . $poeme . ".txt, " . $poeme . "_pte.txt pour le spectre)\n";
close fPOE;
close fPTE;
}
use strict;
use Getopt::Long;
use List::Util qw( max );
my %Symboles = ("'"=> 0, "-"=> 0, "_"=> 0, "'"=> 0, "\""=> 0, "\\"=> 0, "/"=> 0, "|"=> 0, "«"=> 0, "»"=> 0, "°"=> 0, ","=> 0, ";
"=> 0, "."=> 0, "`"=> 0, ":"=> 0, "~"=> 0, "{"=> 0, "}"=> 0, "["=> 0, "]"=> 0, "("=> 0, ")"=> 0, "+"=> 0, "="=> 0, "<"=> 0, ">"=> 0, "*"=> 0, "²"=> 0, "³"=> 0, "?"=> 0, "%"=> 0, "\$"=> 0, "@"=> 0, "±"=> 0, "^"=> 0, "¨"=> 0, "¯"=> 0, "0"=> 0, "9"=> 0, "8"=> 0, "7"=> 0, "6"=> 0, "5"=> 0, "4"=> 0, "3"=> 0, "2"=> 0, "1"=> 0, );
my %Voyelles = ("a"=> 0, "à"=> 0, "â"=> 0, "ä"=> 0, "á"=> 0, "e"=> 0, "è"=> 0, "é"=> 0, "ê"=> 0, "ë"=> 0, "i"=> 0, "î"=> 0, "ï"=> 0, "ì"=> 0, "í"=> 0, "o"=> 0, "ô"=> 0, "ö"=> 0, "ò"=> 0, "ó"=> 0, "u"=> 0, "û"=> 0, "ü"=> 0, "ù"=> 0, "ú"=> 0, "y"=> 0, "A"=> 0, "E"=> 0, "I"=> 0, "O"=> 0, "U"=> 0, "Y"=> 0, );
my %Consonnes = ("b"=> 0, "c"=> 0, "ç"=> 0, "d"=> 0, "f"=> 0, "g"=> 0, "h"=> 0, "j"=> 0, "k"=> 0, "l"=> 0, "m"=> 0, "n"=> 0, "p"=> 0, "q"=> 0, "r"=> 0, "s"=> 0, "t"=> 0, "v"=> 0, "w"=> 0, "x"=> 0, "z"=> 0, "B"=> 0, "C"=> 0, "D"=> 0, "F"=> 0, "G"=> 0, "H"=> 0, "J"=> 0, "K"=> 0, "L"=> 0, "M"=> 0, "N"=> 0, "P"=> 0, "Q"=> 0, "R"=> 0, "S"=> 0, "T"=> 0, "V"=> 0, "W"=> 0, "X"=> 0, "Z"=> 0, );
my $recueilFile;
if ( !GetOptions ( 'recueil=s' => \$recueilFile ) ) { print "!!! Erreur dans la lecture de la ligne de commande\n";
exit(-1);
} if ( !defined $recueilFile ) { print "!!! Aucun fichier spécifié (option -recueil) !!\n";
exit(-1);
} my %Recueil;
my %Mots;
print "\nOuverture du recueil...\n";
open fREC, "<$recueilFile" or die "Impossible d'ouvrir le recueil !\n";
# print "\n\nPremier passage...\n\n";
&premierPassage;
close fREC;
# print "\n\nDeuxième passage...\n\n";
my %Poetivites;
open fREC, "<$recueilFile" or die "Impossible d'ouvrir le recueil !\n";
my $logFile;
if($recueilFile =~ m/^(\S+)\.\w+$/) { $logFile = $1;
} else { $logFile = $recueilFile;
} $logFile .= "_log.txt";
open fLOG, ">$logFile" or die "Impossible de créer le fichier log !\n";
&deuxiemePassage;
close fREC;
close fLOG;
sub deuxiemePassage { my $ligne;
my $indLigne;
my $lastRatio;
my $compteur = 0;
my $poeme = undef;
while(<fREC>) {
chomp;
$ligne = $_;
my @Ligne = split(/\s+/,$ligne);
if($poeme) { &retournementPoetivites ($poeme);
}
$poeme = $1;
$compteur++;
print fLOG "\tPoeme " . $compteur . " : " . $poeme . "\n";
$indLigne = 0;
$lastRatio = undef;
next;
}
my $nbMotsLigne = scalar(@Ligne);
if($nbMotsLigne == 0) { next;
}
my $mot;
$indLigne++;
for(my $indMot = 1 ;
$indMot <= $nbMotsLigne ;
$indMot++) {
$mot = $Ligne[$indMot-1];
if(exists($Symboles{$mot})) { next;
} if(length($mot) == 1 && !exists($Symboles{$mot}) && !exists($Voyelles{$mot}) && !exists($Consonnes{$mot})) { next;
}
$mot = &nettoieMot($mot);
my $poetivite = 0;
$poetivite += max(values(%Mots)) / $Mots{$mot};
my $nbLettresMot = length($mot);
$poetivite *= abs($nbLettresMot - $Recueil{$poeme}{"longueur_mot_moyenne"});
$poetivite *= 1 + $indLigne / $Recueil{$poeme}{"nombre_lignes"};
$poetivite *= 1 + $indMot / $nbMotsLigne;
my @Mot = split(//,$mot);
my $nbVoyelles = 0;
my $nbConsonnes = 0;
my $nbSymboles = 1;
foreach my $lettre (@Mot) { if (exists $Voyelles{$lettre}) { $Voyelles{$lettre}++;
$nbVoyelles ++;
} else { if (exists $Consonnes{$lettre}) { $Consonnes{$lettre}++;
$nbConsonnes ++;
} else { if (exists $Symboles{$lettre}) { $Symboles{$lettre}++;
$nbSymboles ++;
} else { print "Lettre $lettre non identifiable dans $mot à la ligne $indLigne\n";
next;
} } } } if($mot =~ m/au/) {$nbVoyelles--;
}
my $ratio = $nbVoyelles / $nbLettresMot;
if($ratio == 0 || $ratio == 1) { $poetivite *= $nbLettresMot;
if($lastRatio) { if(($lastRatio - $ratio) == 0) { $poetivite *= $nbLettresMot * $nbLettresMot;
} } } else { if($ratio < (1/3)) { $poetivite *= 1/$ratio;
if($lastRatio) { if($ratio <= $lastRatio) { $poetivite *= $lastRatio / $ratio + 1;
} } } else { if($ratio > (2/3)) { $poetivite *= 1/(1-$ratio);
if($lastRatio) { if($ratio >= $lastRatio) { $poetivite *= $ratio / $lastRatio + 1;
} } } else {$poetivite *= 1;
} } } $lastRatio = $ratio;
if($mot =~ /'/) {$nbSymboles--;
} $poetivite *= 1 + $nbSymboles;
if (exists $Symboles{$Mot[0]}) { $poetivite *= 1 + $nbSymboles;
}
$poetivite = int($poetivite + 0.5);
push(@{$Recueil{$poeme}{"Mots"}{$mot}},$poetivite);
}
}
&retournementPoetivites($poeme);
}
sub spectromie { my $ligne;
my $compteur = 0;
my $ligne_poeme = 0;
my $poeme = undef;
while(<fREC>) {
chomp;
$ligne = $_;
$ligne_poeme++;
my @Ligne = split(/\s+/,$ligne);
$poeme = $1;
$ligne_poeme = 0;
$compteur++;
print fSPEC "\tPoeme " . $compteur . " : " . $poeme . "\n";
next;
}
my $nbMotsLigne = scalar(@Ligne);
if($nbMotsLigne == 0) { print fSPEC "\n";
next;
}
foreach my $mot (@Ligne) {
if(exists($Symboles{$mot})) { next;
} if(length($mot) == 1 && !exists($Symboles{$mot}) && !exists($Voyelles{$mot}) && !exists($Consonnes{$mot})) { next;
}
$mot = &nettoieMot($mot);
push(@{$SampledRecueil{$poeme}{$ligne_poeme}{"mots"}},$mot);
push(@{$SampledRecueil{$poeme}{$ligne_poeme}{"poetivites"}},$Recueil{$poeme}{"Mots"}{$mot});
print fSPEC $Recueil{$poeme}{"Mots"}{$mot} . "\t";
}
print fSPEC "\n";
}
}
sub premierPassage { my $ligne;
my $compteur = 0;
my $poeme = undef;
my $nbMots;
my $lengthCumul;
while(<fREC>) {
chomp;
$ligne = $_;
my @Ligne = split(/\s+/,$ligne);
if($poeme) { $Recueil{$poeme}{"longueur_mot_moyenne"} = $lengthCumul / $nbMots;
}
$poeme = $1;
$compteur++;
$Recueil{$poeme}{"nombre_lignes"} = 0;
$nbMots = 0;
$lengthCumul = 0;
next;
}
my $nbMotsLigne = scalar(@Ligne);
if($nbMotsLigne == 0) { next;
} else { $nbMots += $nbMotsLigne;
}
$Recueil{$poeme}{"nombre_lignes"}++;
foreach my $mot (@Ligne) {
if(exists($Symboles{$mot})) { $nbMotsLigne--;
next;
} if(length($mot) == 1 && !exists($Symboles{$mot}) && !exists($Voyelles{$mot}) && !exists($Consonnes{$mot})) { $nbMotsLigne--;
next;
}
$mot = &nettoieMot($mot);
if(!exists($Mots{$mot})) { $Mots{$mot} = 1;
} else { $Mots{$mot}++;
}
$lengthCumul += length($mot);
}
} $Recueil{$poeme}{"longueur_mot_moyenne"} = $lengthCumul / $nbMots;
close fREC;
my $freqMax = 0;
my $motMax;
while((my $mot,my $freq) = each(%Mots)) { if($freq > $freqMax) { $motMax = $mot;
$freqMax = $freq;
} }
}
sub deuxiemePassage { my $ligne;
my $indLigne;
my $lastRatio;
my $compteur = 0;
my $poeme = undef;
while(<fREC>) {
chomp;
$ligne = $_;
my @Ligne = split(/\s+/,$ligne);
if($poeme) { &retournementPoetivites ($poeme);
}
$poeme = $1;
$compteur++;
print fLOG "\tPoeme " . $compteur . " : " . $poeme . "\n";
$indLigne = 0;
$lastRatio = undef;
next;
}
my $nbMotsLigne = scalar(@Ligne);
if($nbMotsLigne == 0) { next;
}
my $mot;
$indLigne++;
for(my $indMot = 1 ;
$indMot <= $nbMotsLigne ;
$indMot++) {
$mot = $Ligne[$indMot-1];
if(exists($Symboles{$mot})) { next;
} if(length($mot) == 1 && !exists($Symboles{$mot}) && !exists($Voyelles{$mot}) && !exists($Consonnes{$mot})) { next;
}
$mot = &nettoieMot($mot);
my $poetivite = 0;
$poetivite += max(values(%Mots)) / $Mots{$mot};
my $nbLettresMot = length($mot);
$poetivite *= abs($nbLettresMot - $Recueil{$poeme}{"longueur_mot_moyenne"});
$poetivite *= 1 + $indLigne / $Recueil{$poeme}{"nombre_lignes"};
$poetivite *= 1 + $indMot / $nbMotsLigne;
my @Mot = split(//,$mot);
my $nbVoyelles = 0;
my $nbConsonnes = 0;
my $nbSymboles = 1;
foreach my $lettre (@Mot) { if (exists $Voyelles{$lettre}) { $Voyelles{$lettre}++;
$nbVoyelles ++;
} else { if (exists $Consonnes{$lettre}) { $Consonnes{$lettre}++;
$nbConsonnes ++;
} else { if (exists $Symboles{$lettre}) { $Symboles{$lettre}++;
$nbSymboles ++;
} else { print "Lettre $lettre non identifiable dans $mot à la ligne $indLigne\n";
next;
} } } } if($mot =~ m/au/) {$nbVoyelles--;
}
my $ratio = $nbVoyelles / $nbLettresMot;
if($ratio == 0 || $ratio == 1) { $poetivite *= $nbLettresMot;
if($lastRatio) { if(($lastRatio - $ratio) == 0) { $poetivite *= $nbLettresMot * $nbLettresMot;
} } } else { if($ratio < (1/3)) { $poetivite *= 1/$ratio;
if($lastRatio) { if($ratio <= $lastRatio) { $poetivite *= $lastRatio / $ratio + 1;
} } } else { if($ratio > (2/3)) { $poetivite *= 1/(1-$ratio);
if($lastRatio) { if($ratio >= $lastRatio) { $poetivite *= $ratio / $lastRatio + 1;
} } } else {$poetivite *= 1;
} } } $lastRatio = $ratio;
if($mot =~ /'/) {$nbSymboles--;
} $poetivite *= 1 + $nbSymboles;
if (exists $Symboles{$Mot[0]}) { $poetivite *= 1 + $nbSymboles;
}
$poetivite = int($poetivite + 0.5);
push(@{$Recueil{$poeme}{"Mots"}{$mot}},$poetivite);
}
}
&retournementPoetivites($poeme);
}
use strict;
print "\n\n\n\n";
open(fREAD,$ARGV[0]) || die;
while(<fREAD>) { my $ligne = $_;
my @Ligne = split(/[,|.|;
]/,$ligne);
foreach my $mot (@Ligne) { $mot =~ s/^ //;
print $mot . "\n";
if($ligne =~ m/$mot\s*,/) { sleep 1;
} else { sleep 2;
}
}
if(scalar(@Ligne) == 0) { print "\n";
}
print "\n";
} close fREAD;
print "\n\n\n\n";
sub poedilation { my $poeme = $_[0];
my $degre = $_[1];
open fPOE, ">" . $poeme . ".txt" or die "Impossible d'ouvrir le fichier $poeme.txt !\n";
open fPTE, ">" . $poeme . "_pte.txt" or die "Impossible d'ouvrir le fichier $poeme.txt !\n";
foreach my $ligne (sort( {$a <=> $b} keys(%{$SampledRecueil{$poeme}}))) {
if(scalar(@{$SampledRecueil{$poeme}{$ligne}{"mots"}}) == 0) { print fPOE "\n";
next;
}
if(scalar(@{$SampledRecueil{$poeme}{$ligne}{"mots"}}) == 1) { print fPOE ${$SampledRecueil{$poeme}{$ligne}{"mots"}}[0] . "\n";
print fPTE ${$SampledRecueil{$poeme}{$ligne}{"poetivites"}}[0] . "\n";
next;
}
my @finalLine;
my @finalPoe;
for (my $i = 0 ;
$i < $degre ;
$i++) {
my @newLine;
my @newPoetivites;
while(scalar(@{$SampledRecueil{$poeme}{$ligne}{"mots"}}) > 1) {
my $motAvant = shift(@{$SampledRecueil{$poeme}{$ligne}{"mots"}});
my $poeAvant = shift(@{$SampledRecueil{$poeme}{$ligne}{"poetivites"}});
my $interpol = int(($poeAvant + ${$SampledRecueil{$poeme}{$ligne}{"poetivites"}}[0]) / 2);
if(exists($Poetivites{$poeme}{$interpol})) {
push(@newLine,${$Poetivites{$poeme}{$interpol}}[int(rand(scalar(@{$Poetivites{$poeme}{$interpol}})))]);
push(@newPoetivites,$interpol);
next;
}
if(exists($Poetivites{$poeme}{$interpol-1})) {
push(@newLine,${$Poetivites{$poeme}{$interpol-1}}[int(rand(scalar(@{$Poetivites{$poeme}{$interpol-1}})))]);
push(@newPoetivites,$interpol-1);
next;
}
if(exists($Poetivites{$poeme}{$interpol+1})) {
push(@newLine,${$Poetivites{$poeme}{$interpol+1}}[int(rand(scalar(@{$Poetivites{$poeme}{$interpol+1}})))]);
push(@newPoetivites,$interpol+1);
next;
}
my @poetivikeys = sort( {$a <=> $b} keys(%{$Poetivites{"recueil"}}));
my $avant = $poetivikeys[0];
my $apres = 0;
foreach my $poetivitest (@poetivikeys) {
next if($poetivitest == $avant);
if($poetivitest > $interpol) { $apres = $poetivitest;
last;
} $avant = $poetivitest;
}
if(($interpol - $avant) > ($apres - $interpol)) { push(@newLine,${$Poetivites{"recueil"}{$apres}}[int(rand(scalar(@{$Poetivites{"recueil"}{$apres}})))]);
push(@newPoetivites,$apres);
} else { push(@newLine,${$Poetivites{"recueil"}{$avant}}[int(rand(scalar(@{$Poetivites{"recueil"}{$avant}})))]);
push(@newPoetivites,$avant);
}
}
if(scalar(@{$SampledRecueil{$poeme}{$ligne}{"mots"}}) > 0) { push(@newLine,shift(@{$SampledRecueil{$poeme}{$ligne}{"mots"}}));
push(@newPoetivites,shift(@{$SampledRecueil{$poeme}{$ligne}{"poetivites"}}));
} @{$SampledRecueil{$poeme}{$ligne}{"mots"}} = @newLine;
@finalLine = @newLine;
@{$SampledRecueil{$poeme}{$ligne}{"poetivites"}} = @newPoetivites;
@finalPoe = @newPoetivites;
}
foreach my $motfinal (@finalLine) { print fPOE $motfinal . " ";
} foreach my $poefinale (@finalPoe) { print fPTE $poefinale . " ";
} print fPOE "\n";
print fPTE "\n";
}
print "\n\npoedilation OK ! (voir " . $poeme . ".txt, " . $poeme . "_pte.txt pour le spectre)\n";
close fPOE;
close fPTE;
}