use of fr.inrialpes.exmo.align.impl.eval.PRecEvaluator in project legato by DOREMUS-ANR.
the class Align method evaluateMappings.
public static void evaluateMappings() throws AlignmentException {
LEGATO legato = LEGATO.getInstance();
if (legato.getRefAlign() == null)
GUI.resultsArea.append("\nNo reference alignment file found !");
else {
AlignmentParser parser = new AlignmentParser(0);
Alignment refAlign = parser.parse((legato.refAlign).toURI());
Alignment mapFile = parser.parse(new File(legato.getPath() + File.separator + "results.rdf").toURI());
Properties p = new Properties();
Evaluator evaluator = new PRecEvaluator(refAlign, mapFile);
evaluator.eval(p);
GUI.resultsArea.append("\nEvaluation results:");
GUI.resultsArea.append("\nF-Measure = " + Math.floor(((PRecEvaluator) evaluator).getFmeasure() * 100) / 100);
GUI.resultsArea.append("\nPrecision = " + Math.floor(((PRecEvaluator) evaluator).getPrecision() * 100) / 100);
GUI.resultsArea.append("\nRecall = " + Math.floor(((PRecEvaluator) evaluator).getRecall() * 100) / 100);
}
}
Aggregations