1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#!/usr/bin/perl -w
my @mot;
my @mot_etiq;
open(fid,"Sample.buck.TOK") || die ("couldn't open file.txt!");
open(fid_lem,"Sample.buck.TOK.LEM.POS") || die ("couldn't open file.txt!");
open(fid_g,">result.txt") || die ("couldn't open graphe.txt!");
while (<fid>)
{ @mot = (@mot,split(/[\s]/,$_));
while (<fid_lem>)
{
@mot_etiq = (@mot_etiq,split(/[\s]/,$_));
foreach $i (0..$#mot)
{
foreach $j (0..$#mot_etiq)
{
print fid_g ($mot_etiq[j].$mot[i]);
}
}
}
}
close(fid);
close(fid_lem);
close(fid_g); |
Partager