diff --git a/README.TXT b/README.TXT index 4d11c147c5c69800d5a6400bfa55a2934c249500..4f10c744a6431c5920a8e99fbe04bb07aa588654 100644 --- a/README.TXT +++ b/README.TXT @@ -4,7 +4,7 @@ # http://alignapi.gforge.inria.fr # ####################################################################### -Copyright (C) 2003-2010 INRIA. +Copyright (C) 2003-2011 INRIA. Copyright (C) 2004-2005 Université de Montréal. Copyright (C) 2005 CNR Pisa. Copyright (C) 2005 Konstantinos A. Nedas. diff --git a/html/impl.html b/html/impl.html index 11b909447a8e8f3ee00a0c8411816691fb90ab3c..85020d236f3daa2d4eafe75821e51546c099f4ef 100644 --- a/html/impl.html +++ b/html/impl.html @@ -528,6 +528,10 @@ pp-59-76, 2006 </a>, </dd> </dl> +<!-- +Can have a look at: +http://scholar.google.fr/scholar?cites=7388654705706200775&as_sdt=2005 +--> <!-- ISI cite: Record 2 of 10 Author(s): Van de Maele, F (Van de Maele, Felix); Diaz, A (Diaz, Alicia) diff --git a/html/labels.html b/html/labels.html index b9936286c557dec2cc225e4e0a636b8d8ff87578..cb71eb9c556509478029e1aacffbc054f6ed8155 100644 --- a/html/labels.html +++ b/html/labels.html @@ -68,6 +68,10 @@ <dd>STRING the properties satisfied by an alignment or correspondences</dd> <dt>http://knowledgeweb.semanticweb.org/heterogeneity/alignment#pretty</dd> <dd>STRING a short descriptive name of the alignment.</dd> +<dt>http://knowledgeweb.semanticweb.org/heterogeneity/alignment#label1</dd> +<dd>STRING a short descriptive name for the first aligned entity (in correspondences).</dd> +<dt>http://knowledgeweb.semanticweb.org/heterogeneity/alignment#label2</dd> +<dd>STRING a short descriptive name for the second aligned entity (in correspondences).</dd> <dt>http://knowledgeweb.semanticweb.org/heterogeneity/alignment#provenance</dd> <dd>STRING identify the tools and versions who created the alignments (concatenated by ;).</dd> diff --git a/html/relnotes.html b/html/relnotes.html index 24c41c20aca9efac8fa83dcf03e65a94d475ddb2..30320c537501503b77fd1afc127793f8f09e9dd6 100644 --- a/html/relnotes.html +++ b/html/relnotes.html @@ -31,7 +31,7 @@ Other less radical changes include: <ul compact="1"> <li>Implementation of <tt>Relation</tt> and <tt>Confidence</tt> interfaces </li> </ul> -The development of 4 versions continue. +The development of 4 versions continues. </p> <h2>Under development (you can contribute)</h2> @@ -50,7 +50,6 @@ The development of 4 versions continue. <li>Implement metadata edition (server)</li> <li>Implement correspondence selection (server)</li> <li>Implement <tt>ontowrap</tt> support in database store (server)</li> -<!--li>Move <tt>OLgraphs</tt> as HeavyLoadedOntology (ontowrap)</li--> <li>Render alignments as module descriptions (impl)</li> <li>Implement extensive evaluation framework (impl)</li> <li>Implement debug options with log4j</li> @@ -60,10 +59,13 @@ The development of 4 versions continue. <h2>Current SVN trunk version</h2> <!--h2>Version 4.3 (): xx/xx/xxxx - Zimt</h2--> -<!--h2>Version 4.2 (): xx/xx/xxxx - Tring</h2--> +<!--h2>Version 4.2 (): xx/xx/2011 - Tring</h2--> <p><ul compact="1"> +<li>Added <tt>WeightedPRecEvaluator</tt> weighting confidences (eval)</li> <li>Changed order of display to precision/F-measure/recall (util)</li> +<li>Suppressed incorrect computation of fallout (eval)</li> +<li>Minor display changes in HTML display (server)</li> </ul></p> <h2>Version 4.1 (1534): 13/10/2010 - Napjakmandu</h2> diff --git a/src/fr/inrialpes/exmo/align/impl/eval/PRecEvaluator.java b/src/fr/inrialpes/exmo/align/impl/eval/PRecEvaluator.java index d53ed686e91927e42fee93f9c9699e3894b57844..117643b0ef53f81d8c03c95ae781162057b33e05 100644 --- a/src/fr/inrialpes/exmo/align/impl/eval/PRecEvaluator.java +++ b/src/fr/inrialpes/exmo/align/impl/eval/PRecEvaluator.java @@ -1,7 +1,7 @@ /* * $Id$ * - * Copyright (C) INRIA, 2004-2010 + * Copyright (C) INRIA, 2004-2011 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -41,7 +41,7 @@ import java.net.URI; /** * Evaluate proximity between two alignments. - * This function implements Precision/Recall/Fallout. The first alignment + * This function implements Precision/Recall. The first alignment * is thus the expected one. * * NOTE: This measure does not take relations nor confidences into account @@ -57,8 +57,6 @@ public class PRecEvaluator extends BasicEvaluator implements Evaluator { protected double recall = 1.; - protected double fallout = 0.; - protected double overall = 0.; protected double fmeasure = 0.; @@ -85,7 +83,6 @@ public class PRecEvaluator extends BasicEvaluator implements Evaluator { public void init(){ precision = 0.; recall = 0.; - fallout = 0.; overall = 0.; fmeasure = 0.; time = 0; @@ -141,7 +138,6 @@ public class PRecEvaluator extends BasicEvaluator implements Evaluator { } protected double computeDerived() { - fallout = (double) (nbfound - nbcorrect) / (double) nbfound; fmeasure = 2 * precision * recall / (precision + recall); overall = recall * (2 - (1 / precision)); result = recall / precision; @@ -167,7 +163,6 @@ public class PRecEvaluator extends BasicEvaluator implements Evaluator { // result += " <"+Namespace.ATLMAP.shortCut+":falsePositive>"); result += " <dt>precision</dt><dd property=\""+Namespace.ATLMAP.shortCut+":precision\">"+precision+"</dd>\n"; result += " <dt>recall</dt><dd property=\""+Namespace.ATLMAP.shortCut+":recall\">"+recall+"</dd>\n"; - result += " <dt>fallout</dt><dd property=\""+Namespace.ATLMAP.shortCut+":fallout\">"+fallout+"</dd>\n"; result += " <dt>F-measure</dt><dd property=\""+Namespace.ATLMAP.shortCut+":fMeasure\">"+fmeasure+"</dd>\n"; result += " <dt>O-measure</dt><dd property=\""+Namespace.ATLMAP.shortCut+":oMeasure\">"+overall+"</dd>\n"; if ( time != 0 ) result += " <dt>time</dt><dd property=\""+Namespace.ATLMAP.shortCut+":time\">"+time+"</dd>\n"; @@ -197,9 +192,7 @@ return result; writer.print(precision); writer.print("</"+Namespace.ATLMAP.shortCut+":precision>\n <"+Namespace.ATLMAP.shortCut+":recall>"); writer.print(recall); - writer.print("</"+Namespace.ATLMAP.shortCut+":recall>\n <fallout>"); - writer.print(fallout); - writer.print("</fallout>\n <"+Namespace.ATLMAP.shortCut+":fMeasure>"); + writer.print("</"+Namespace.ATLMAP.shortCut+":recall>\n <"+Namespace.ATLMAP.shortCut+":fMeasure>"); writer.print(fmeasure); writer.print("</"+Namespace.ATLMAP.shortCut+":fMeasure>\n <"+Namespace.ATLMAP.shortCut+":oMeasure>"); writer.print(overall); @@ -214,7 +207,6 @@ return result; results.setProperty( "precision", Double.toString( precision ) ); results.setProperty( "recall", Double.toString( recall ) ); results.setProperty( "overall", Double.toString( overall ) ); - results.setProperty( "fallout", Double.toString( fallout ) ); results.setProperty( "fmeasure", Double.toString( fmeasure ) ); results.setProperty( "nbexpected", Integer.toString( nbexpected ) ); results.setProperty( "nbfound", Integer.toString( nbfound ) ); @@ -226,7 +218,9 @@ return result; public double getPrecision() { return precision; } public double getRecall() { return recall; } public double getOverall() { return overall; } - public double getFallout() { return fallout; } + public double getFallout() throws AlignmentException { throw new AlignmentException("Fallout computation to be deprecated (version 4.2)"); } + public double getNoise() { return 1.-precision; } + public double getSilence() { return 1.-precision; } public double getFmeasure() { return fmeasure; } public int getExpected() { return nbexpected; } public int getFound() { return nbfound; } diff --git a/src/fr/inrialpes/exmo/align/impl/eval/SemPRecEvaluator.java b/src/fr/inrialpes/exmo/align/impl/eval/SemPRecEvaluator.java index 8927e1141c84926c819273335bbd4ddf31779216..8d3ca81b6934addac486f709810e7385f318ed65 100644 --- a/src/fr/inrialpes/exmo/align/impl/eval/SemPRecEvaluator.java +++ b/src/fr/inrialpes/exmo/align/impl/eval/SemPRecEvaluator.java @@ -1,7 +1,7 @@ /* * $Id$ * - * Copyright (C) INRIA, 2009-2010 + * Copyright (C) INRIA, 2009-2011 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -44,7 +44,7 @@ import java.net.URI; /** * Evaluate proximity between two alignments. - * This function implements Precision/Recall/Fallout. The first alignment + * This function implements Precision/Recall. The first alignment * is thus the expected one. * * @author Jerome Euzenat diff --git a/src/fr/inrialpes/exmo/align/impl/eval/WeightedPREvaluator.java b/src/fr/inrialpes/exmo/align/impl/eval/WeightedPREvaluator.java index a4c010f92334db501257ce8bdec71db16417d14b..970cf28240b758970d98b27e7bed145b19c63e2b 100644 --- a/src/fr/inrialpes/exmo/align/impl/eval/WeightedPREvaluator.java +++ b/src/fr/inrialpes/exmo/align/impl/eval/WeightedPREvaluator.java @@ -1,7 +1,7 @@ /* * $Id: WeightedPRecEvaluator.java 1494 2010-07-23 14:43:36Z euzenat $ * - * Copyright (C) INRIA, 2004-2010 + * Copyright (C) INRIA, 2004-2011 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -41,7 +41,7 @@ import java.net.URI; /** * Evaluate proximity between two alignments. - * This function implements Precision/Recall/Fallout. The first alignment + * This function implements Precision/Recall. The first alignment * is thus the expected one. * * NOTE: This measure does not take relations nor confidences into account @@ -57,8 +57,6 @@ public class WeightedPREvaluator extends BasicEvaluator implements Evaluator { protected double recall = 1.; - protected double fallout = 0.; - protected double overall = 0.; protected double fmeasure = 0.; @@ -88,7 +86,6 @@ public class WeightedPREvaluator extends BasicEvaluator implements Evaluator { public void init(){ precision = 0.; recall = 0.; - fallout = 0.; overall = 0.; fmeasure = 0.; time = 0; @@ -152,7 +149,6 @@ public class WeightedPREvaluator extends BasicEvaluator implements Evaluator { } protected double computeDerived() { - fallout = (double) (nbfound - nbcorrect) / (double) nbfound; fmeasure = 2 * precision * recall / (precision + recall); overall = recall * (2 - (1 / precision)); result = recall / precision; @@ -178,7 +174,6 @@ public class WeightedPREvaluator extends BasicEvaluator implements Evaluator { // result += " <"+Namespace.ATLMAP.shortCut+":falsePositive>"); result += " <dt>precision</dt><dd property=\""+Namespace.ATLMAP.shortCut+":precision\">"+precision+"</dd>\n"; result += " <dt>recall</dt><dd property=\""+Namespace.ATLMAP.shortCut+":recall\">"+recall+"</dd>\n"; - result += " <dt>fallout</dt><dd property=\""+Namespace.ATLMAP.shortCut+":fallout\">"+fallout+"</dd>\n"; result += " <dt>F-measure</dt><dd property=\""+Namespace.ATLMAP.shortCut+":fMeasure\">"+fmeasure+"</dd>\n"; result += " <dt>O-measure</dt><dd property=\""+Namespace.ATLMAP.shortCut+":oMeasure\">"+overall+"</dd>\n"; if ( time != 0 ) result += " <dt>time</dt><dd property=\""+Namespace.ATLMAP.shortCut+":time\">"+time+"</dd>\n"; @@ -208,9 +203,7 @@ return result; writer.print(precision); writer.print("</"+Namespace.ATLMAP.shortCut+":precision>\n <"+Namespace.ATLMAP.shortCut+":recall>"); writer.print(recall); - writer.print("</"+Namespace.ATLMAP.shortCut+":recall>\n <fallout>"); - writer.print(fallout); - writer.print("</fallout>\n <"+Namespace.ATLMAP.shortCut+":fMeasure>"); + writer.print("</"+Namespace.ATLMAP.shortCut+":recall>\n <"+Namespace.ATLMAP.shortCut+":fMeasure>"); writer.print(fmeasure); writer.print("</"+Namespace.ATLMAP.shortCut+":fMeasure>\n <"+Namespace.ATLMAP.shortCut+":oMeasure>"); writer.print(overall); @@ -225,7 +218,6 @@ return result; results.setProperty( "precision", Double.toString( precision ) ); results.setProperty( "recall", Double.toString( recall ) ); results.setProperty( "overall", Double.toString( overall ) ); - results.setProperty( "fallout", Double.toString( fallout ) ); results.setProperty( "fmeasure", Double.toString( fmeasure ) ); // WPR results.setProperty( "nbexpected", Double.toString( nbexpected ) ); @@ -238,7 +230,9 @@ return result; public double getPrecision() { return precision; } public double getRecall() { return recall; } public double getOverall() { return overall; } - public double getFallout() { return fallout; } + public double getFallout() throws AlignmentException { throw new AlignmentException("Fallout computation to be deprecated (version 4.2)"); } + public double getNoise() { return 1.-precision; } + public double getSilence() { return 1.-precision; } public double getFmeasure() { return fmeasure; } // WPR public double getExpected() { return nbexpected; } diff --git a/src/fr/inrialpes/exmo/align/util/GroupEval.java b/src/fr/inrialpes/exmo/align/util/GroupEval.java index a8be957601aecaa15313ff4cdad3f4729ab75e55..4c3aced032494cdc7190c7c8c4bc3823a9e7e13e 100644 --- a/src/fr/inrialpes/exmo/align/util/GroupEval.java +++ b/src/fr/inrialpes/exmo/align/util/GroupEval.java @@ -3,7 +3,7 @@ * * Copyright (C) 2003 The University of Manchester * Copyright (C) 2003 The University of Karlsruhe - * Copyright (C) 2003-2010, INRIA + * Copyright (C) 2003-2011, INRIA * Copyright (C) 2004, Université de Montréal * * This program is free software; you can redistribute it and/or @@ -63,7 +63,7 @@ import fr.inrialpes.exmo.align.parser.AlignmentParser; where the options are: <pre> -o filename --output=filename - -f format = prfmot (precision/recall/fallout/f-measure/overall/time) --format=prfmot + -f format = prfot (precision/recall/f-measure/overall/time) --format=prfot -d debug --debug=level -r filename --reference=filename -s algo/measure @@ -447,8 +447,6 @@ which the program does... if ( format.charAt(i) == 'p' ) { writer.print("Prec."); } else if ( format.charAt(i) == 'f' ) { - writer.print("Fall."); - } else if ( format.charAt(i) == 'm' ) { writer.print("FMeas."); } else if ( format.charAt(i) == 'o' ) { writer.print("Over."); @@ -504,8 +502,6 @@ which the program does... if ( format.charAt(i) == 'p' ) { formatter.format("%1.2f", eval.getPrecision()); } else if ( format.charAt(i) == 'f' ) { - formatter.format("%1.2f", eval.getFallout()); - } else if ( format.charAt(i) == 'm' ) { formatter.format("%1.2f", eval.getFmeasure()); } else if ( format.charAt(i) == 'o' ) { formatter.format("%1.2f", eval.getOverall()); @@ -542,8 +538,6 @@ which the program does... if ( format.charAt(i) == 'p' ) { formatter.format("%1.2f", precision); } else if ( format.charAt(i) == 'f' ) { - formatter.format("%1.2f", (double)(foundVect[k] - correctVect[k])/foundVect[k]); - } else if ( format.charAt(i) == 'm' ) { formatter.format("%1.2f", 2 * precision * recall / (precision + recall)); } else if ( format.charAt(i) == 'o' ) { formatter.format("%1.2f", recall * (2 - (1 / precision))); @@ -574,7 +568,7 @@ which the program does... public void usage() { System.out.println("usage: GroupEval [options]"); System.out.println("options are:"); - System.out.println("\t--format=prfmot -r prfmot\tSpecifies the output order (precision/recall/fallout/f-measure/overall/time)"); + System.out.println("\t--format=prfot -r prfot\tSpecifies the output order (precision/recall/f-measure/overall/time)"); // Apparently not implemented //System.out.println("\t--sup=algo -s algo\tSpecifies if dominant columns are algorithms or measure"); System.out.println("\t--output=filename -o filename\tSpecifies a file to which the output will go"); diff --git a/test/src/READMETest.java b/test/src/READMETest.java index 53d2dbec4876c65b7007086a55f5a6e1da9e2a7f..5ee9a687a27708cc069f797e59dbe31f9be06ac7 100644 --- a/test/src/READMETest.java +++ b/test/src/READMETest.java @@ -1,7 +1,7 @@ /* * $Id$ * - * Copyright (C) INRIA, 2008-2010 + * Copyright (C) INRIA, 2008-2011 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -250,12 +250,31 @@ $ java -cp lib/procalign.jar fr.inrialpes.exmo.align.util.EvalAlign -i fr.inrial writer.close(); assertEquals( eval.getPrecision(), 0.7619047619047619);//7272727272727273 ); assertEquals( eval.getRecall(), 1.0 ); - assertEquals( eval.getFallout(), 0.23809523809523808);//2727272727272727 ); + assertEquals( eval.getNoise(), 0.23809523809523814);//2727272727272727 ); assertEquals( eval.getFmeasure(), 0.8648648648648648);//8421052631578948 ); assertEquals( eval.getOverall(), 0.6875);//625 ); //assertEquals( eval.getResult(), 1.34375 ); } + @Test(expectedExceptions = AlignmentException.class, groups = {"full", "impl", "raw" }, dependsOnMethods = {"routineEvalTest"}) + public void routineErrorEvalTest() throws Exception { + AlignmentParser aparser1 = new AlignmentParser( 0 ); + assertNotNull( aparser1 ); + Alignment align1 = aparser1.parse( "test/output/bibref2.rdf" ); + assertNotNull( align1 ); + aparser1.initAlignment( null ); + Alignment align2 = aparser1.parse( "test/output/bibref.rdf" ); + assertNotNull( align2 ); + Properties params = new Properties(); + assertNotNull( params ); + PRecEvaluator eval = new PRecEvaluator( align1, align2 ); + assertNotNull( eval ); + eval.eval( params ) ; + + eval.getFallout(); //4.2: Deprecated raises an error + } + + @Test(groups = { "full", "sem" }, dependsOnMethods = {"routineEvalTest"}) public void specificEvalTest() throws Exception { AlignmentParser aparser1 = new AlignmentParser( 0 ); @@ -282,7 +301,8 @@ $ java -cp lib/procalign.jar fr.inrialpes.exmo.align.util.EvalAlign -i fr.inrial // These figures must be checked at least onece! assertEquals( eval.getPrecision(), 0.3181818181818182 ); assertEquals( eval.getRecall(), 0.3939393939393939 ); - assertEquals( eval.getFallout(), 1.0 ); + assertEquals( eval.getNoise(), 1.0 ); + //assertEquals( eval.getFallout(), 1.0 ); assertEquals( eval.getFmeasure(), 0.3520309477756286 ); assertEquals( eval.getOverall(), -0.4502164502164502 ); //assertEquals( eval.getResult(), 1.34375 );