# Generateur pour les scripts ROUGE 1.5.5 (automatic summarizing evaluation)
# Version 0.1   29/11/09
# Juan Manuel Torres-Moreno  / LIA Avignon
# juan-manuel.torres@univ-avignon.fr

use strict ;

#------------- Textes a tester
my %texte = ();
foreach my $nom ("01","02","04","07","15","29","30","32") {
  $texte{$nom} = "texto$nom.txt";	# Nom du fichier resume peer a tester
}

#-------------- Systemes   PEERS
my %systeme = ();
   $systeme{cortex_summterm} = "cortex_summterm_11";
   $systeme{summterm}        = "summterm_11";
   $systeme{enertex}         = "enertex_11";
   $systeme{cortex}          = "cortex_11";
   $systeme{baseline_alea}   = "baseline_alea_11";
   $systeme{baseline_prim}   = "baseline_prim_11";
   $systeme{word}            = "word";
   $systeme{ots}             = "ots";
   $systeme{pertinence}      = "pertinence";
   $systeme{swesum}          = "swesum";

#-------------- Modeles   MODELS
my %modelo = ();
   $modelo{autor} = "autor";
#   $modelo{med1} = "med1";
#   $modelo{med2} = "med2";
#   $modelo{med3} = "med3";

#---------------------------------------------- Generation du script ROUGE

print "<ROUGE_EVAL version=\"1.5.5\">\n";
foreach my $j (sort keys %texte) {
	my %juez = ();		# Models
	my %candidate = ();	# Peers
   	foreach my $i (sort keys %systeme) {
       		$candidate{$i} = "resume_".$texte{$j}."_".$systeme{$i}.".txt"; 
   	}
   	foreach my $i (sort keys %modelo) {
       		$juez{$i}      = "resume_".$texte{$j}."_".$modelo{$i}.".txt"; 
   	}

	print "<EVAL ID=\"$texte{$j}\">\n";
	print "<PEER-ROOT>\n ./peers\n</PEER-ROOT>\n";
	print "<MODEL-ROOT>\n ./models\n</MODEL-ROOT>\n";
	print "<INPUT-FORMAT TYPE=\"SPL\">\n</INPUT-FORMAT>\n";
	print "<PEERS>\n";
	foreach my $i  (sort keys %systeme) {
	  print "\t<P ID=\"$systeme{$i}\">$candidate{$i}</P>\n";
	}
	print "</PEERS>\n";
	print "<MODELS>\n";
	foreach my $i (sort keys %modelo) {
	  print "\t<M ID=\"$modelo{$i}\">$juez{$i}</M>\n";
	}
	print "</MODELS>\n";
	print "</EVAL>\n\n";
} # for J
print "</ROUGE_EVAL>\n";

