list = d.getElementsByTagName(Constants.StemmedStopwordListQ);
if (list.getLength() > 0) { conf.set(Constants.StemmedStopwordListQ, list.item(0).getTextContent()); }
}
static float eval(QueryEngine qe, Configuration conf, String setting){
Qrels qrels = new Qrels(conf.get(Constants.QrelsPath));
DocnoMapping mapping = qe.getDocnoMapping();
float apSum = 0, p10Sum = 0;
Map<String, Accumulator[]> results = qe.getResults();
for (String qid : results.keySet()) {
float ap = (float) RankedListEvaluator.computeAP(results.get(qid), mapping,
qrels.getReldocsForQid(qid));
float p10 = (float) RankedListEvaluator.computePN(10, results.get(qid), mapping,
qrels.getReldocsForQid(qid));
LOG.info("<AP>:::"+setting+":::"+qid+":::"+results.get(qid).length+":::"+qrels.getReldocsForQid(qid).size()+":::"+ap+":::"+p10);
apSum += ap;
p10Sum += p10;
}
conf.setFloat("AP", apSum);
conf.setFloat("P10", p10Sum);