//logger.info("number of tokens: " + i.getCollectionStatistics().getNumberOfTokens());
//logger.info("number of pointers: " + i.getCollectionStatistics().getNumberOfPointers());
}
i.close();
} else if (evaluation) {
Evaluation te = null;
if (evaluation_type.equals("adhoc"))
te = new AdhocEvaluation();
else if (evaluation_type.equals("named"))
te = new NamedPageEvaluation();
String[] nomefile = null;
if (evaluationFilename == null)
{
/* list all the result files and then evaluate them */
File fresdirectory = new File(ApplicationSetup.TREC_RESULTS);
nomefile = fresdirectory.list();
}
else
{
nomefile =new String[]{evaluationFilename};
}
for (int i = 0; i < nomefile.length; i++) {
if (nomefile[i].endsWith(".res")) {
String resultFilename = ApplicationSetup.TREC_RESULTS+ "/" + nomefile[i];
if (nomefile[i].indexOf("/") >= 0)
resultFilename = nomefile[i];
String evaluationResultFilename =
resultFilename.substring(
0,
resultFilename.lastIndexOf('.'))
+ ".eval";
te.evaluate(resultFilename);
if (evaluation_per_query)
te.writeEvaluationResultOfEachQuery(evaluationResultFilename);
else
te.writeEvaluationResult(evaluationResultFilename);
}
}
}
long endTime = System.currentTimeMillis();