double r = 0;
double p = 0;
double f = 0;
System.out.println("ROUGE-N");
IRouge rouge = null;
for (IRougeSummaryModel system : results.keySet())
{
rouge = new RougeN(system, results.get(system), Integer.MAX_VALUE, Integer.MAX_VALUE, 2, 'A', 0.5);
Map<ScoreType, Double> scores = rouge.evaluate();
r += scores.get(ScoreType.R);
p += scores.get(ScoreType.P);
f += scores.get(ScoreType.F);
}
r = r / (double)results.size();
p = p / (double)results.size();
f = f / (double)results.size();
System.out.println("Average_R: " + r);
System.out.println("Average_P: " + p);
System.out.println("Average_F: " + f);
System.out.println("JROUGE-N");
r = p = f = 0;
rouge = null;
for (IRougeSummaryModel system : results.keySet())
{
rouge = new JRougeN(system, results.get(system), Integer.MAX_VALUE, Integer.MAX_VALUE, 2, 'A', 0.5);
Map<ScoreType, Double> scores = rouge.evaluate();
r += scores.get(ScoreType.R);
p += scores.get(ScoreType.P);
f += scores.get(ScoreType.F);
}