diff --git a/src/fr/inrialpes/exmo/align/impl/eval/PRGraphEvaluator.java b/src/fr/inrialpes/exmo/align/impl/eval/PRGraphEvaluator.java index cd3a1ddc29a0868aab223dc38349946a2bde5be3..1b8012c7e9b533212ae5cdc0ada8887e34a51543 100644 --- a/src/fr/inrialpes/exmo/align/impl/eval/PRGraphEvaluator.java +++ b/src/fr/inrialpes/exmo/align/impl/eval/PRGraphEvaluator.java @@ -136,13 +136,10 @@ public class PRGraphEvaluator extends BasicEvaluator { return -1; } else if ( ((OWLEntity)((Cell)o1).getObject2()).getURI().getFragment().compareTo(((OWLEntity)((Cell)o2).getObject2()).getURI().getFragment()) > 0) { return -1; - // On va supposer qu'ils n'ont pas le meme nom + // We assume that they have different names } else { return 1; } - } else { - throw new ClassCastException(); - } - } catch ( OWLException e) { - e.printStackTrace(); return 0;} + } else { throw new ClassCastException(); } + } catch ( OWLException e) { e.printStackTrace(); return 0;} } } ); diff --git a/src/fr/inrialpes/exmo/align/impl/eval/PRecEvaluator.java b/src/fr/inrialpes/exmo/align/impl/eval/PRecEvaluator.java index 31f5bf8803ae1a39488dfd689d98ac1cf5ad7dca..097a133bd668fad6d93707d749610a26ae2ec951 100644 --- a/src/fr/inrialpes/exmo/align/impl/eval/PRecEvaluator.java +++ b/src/fr/inrialpes/exmo/align/impl/eval/PRecEvaluator.java @@ -66,6 +66,8 @@ public class PRecEvaluator extends BasicEvaluator { private double fmeasure = 0.; + private long time = 0; + private int nbexpected = 0; private int nbfound = 0; @@ -149,6 +151,8 @@ public class PRecEvaluator extends BasicEvaluator { fmeasure = 2 * precision * recall / (precision + recall); overall = recall * (2 - (1 / precision)); result = recall / precision; + String timeExt = align2.getExtension("time"); + if ( timeExt != null ) time = Long.parseLong(timeExt); //System.err.println(">>>> " + nbcorrect + " : " + nbfound + " : " + nbexpected); return (result); } @@ -180,8 +184,9 @@ public class PRecEvaluator extends BasicEvaluator { writer.print(fmeasure); writer.print("</map:fMeasure>\n <map:oMeasure>"); writer.print(overall); - writer.print("</map:oMeasure>\n <result>"); - writer.print(result); + writer.print("</map:oMeasure>\n"); + if ( time != 0 ) writer.print("<time>"+time+"</time>\n"); + writer.print("<result>"+result); writer.print("</result>\n </map:output>\n</rdf:RDF>\n"); } @@ -193,5 +198,6 @@ public class PRecEvaluator extends BasicEvaluator { public int getExpected() { return nbexpected; } public int getFound() { return nbfound; } public int getCorrect() { return nbcorrect; } + public long getTime() { return time; } }