diff --git a/html/relnotes.html b/html/relnotes.html index 92ba528081bac7425add6801eddbaf7718ae9e4d..3d72db795812774d3deeffd2fc50285a60b6e1ed 100644 --- a/html/relnotes.html +++ b/html/relnotes.html @@ -35,10 +35,12 @@ <h2>Current SVN trunk version</h2> <p><ul compact="1"> -<li>Adding HTML Alignement server profile (under development)</li> -<li>Adding SQL storage support (under development)</li> <li>Adding Alignement server (under development)</li> +<li>Adding SQL storage support (under development)</li> +<li>Adding HTML Alignement server profile (under development)</li> +<li>Suppressed outdated "tutorial" from repository (see html/tutorial)</li> <li>Corrected Cell id rendering/parse in RDF/XML (rdf:about)</li> +<li>Improved Precision/recall graph rendering in LaTeX</li> </ul></p> <h2>July 10th, 2006</h2> diff --git a/src/fr/inrialpes/exmo/align/impl/eval/PRGraphEvaluator.java b/src/fr/inrialpes/exmo/align/impl/eval/PRGraphEvaluator.java index 1b8012c7e9b533212ae5cdc0ada8887e34a51543..1c1d468c50c6c52c29c946b8c3efc397df2b5998 100644 --- a/src/fr/inrialpes/exmo/align/impl/eval/PRGraphEvaluator.java +++ b/src/fr/inrialpes/exmo/align/impl/eval/PRGraphEvaluator.java @@ -152,6 +152,7 @@ public class PRGraphEvaluator extends BasicEvaluator { // Collect the points that change recall // (the other provide lower precision from the same recall // and are not considered) + points.add( new Pair( 0., 1. ) ); for( Iterator it = cellSet.iterator(); it.hasNext(); ){ nbfound++; Cell c2 = (Cell)it.next(); @@ -175,6 +176,12 @@ public class PRGraphEvaluator extends BasicEvaluator { } } } + // Now if we want to have a regular curve we must penalize those system + // that do not reach 100% recall. + // for that purpose, and for each other bound we add a point with the worse + // precision which is the required recall level divided with the maximum + // cardinality possible (i.e., the multiplication of the ontology sizes). + points.add( new Pair( 1.0, 0. ) ); // useless because // Interpolate curve points at each n-recall level // This is inspired form Ray Mooney's program @@ -194,7 +201,7 @@ public class PRGraphEvaluator extends BasicEvaluator { if ( precrec.getY() > best ) best = precrec.getY(); j--; } - precisions[0] = best; + precisions[0] = best; // It should be 1. that's why it is now added in points. return 0.0; // useless } diff --git a/src/fr/inrialpes/exmo/align/util/ExtGroupEval.java b/src/fr/inrialpes/exmo/align/util/ExtGroupEval.java index 6c0a6d142376071a49fa2fe2a9d36e47274e651e..4d0e0085e9ec1ef5f5fdf7fec114b4a32a05145c 100644 --- a/src/fr/inrialpes/exmo/align/util/ExtGroupEval.java +++ b/src/fr/inrialpes/exmo/align/util/ExtGroupEval.java @@ -6,11 +6,6 @@ * Copyright (C) 2003-2005, INRIA Rhône-Alpes * Copyright (C) 2004, Université de Montréal * - * Modifications to the initial code base are copyright of their - * respective authors, or their employers as appropriate. Authorship - * of the modifications may be determined from the ChangeLog placed at - * the end of this file. - * * 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 the Free Software Foundation; either version 2.1 of @@ -28,6 +23,8 @@ */ /* This program evaluates the results of several ontology aligners in a row. + It uses the generalisations of precision and recall described in + [Ehrig & Euzenat 2005]. */ package fr.inrialpes.exmo.align.util; @@ -61,12 +58,13 @@ import gnu.getopt.Getopt; import fr.inrialpes.exmo.align.parser.AlignmentParser; -/** A basic class for synthesizing the results of a set of alignments provided by - different algorithms. The output is a table showing various classical measures - for each test and for each algorithm. Average is also computed as Harmonic means. +/** A basic class for synthesizing the results of a set of alignments provided + by different algorithms. The output is a table showing various generalisations + of precision and recall for each test and for each algorithm. + Average is also computed as Harmonic means. <pre> - java -cp procalign.jar fr.inrialpes.exmo.align.util.GroupEval [options] + java -cp procalign.jar fr.inrialpes.exmo.align.util.ExtGroupEval [options] </pre> where the options are: @@ -79,12 +77,13 @@ import fr.inrialpes.exmo.align.parser.AlignmentParser; -t output --type=output: xml/tex/html/ascii </pre> - The input is taken in the current directory in a set of subdirectories (one per - test which will be rendered by a line) each directory contains a number of - alignment files (one per algorithms which will be renderer as a column). + The input is taken in the current directory in a set of subdirectories + (one per test which will be rendered by a line) each directory contains + a number of alignment files (one per algorithms which will be renderer + as a column). - If output is requested (<CODE>-o</CODE> flags), then output will be written to - <CODE>output</CODE> if present, stdout by default. + If output is requested (<CODE>-o</CODE> flags), then output will be + written to <CODE>output</CODE> if present, stdout by default. <pre> $Id$ @@ -430,7 +429,7 @@ public class ExtGroupEval { public static void usage() { System.out.println("usage: ExtGroupEval [options]"); System.out.println("options are:"); - System.out.println("\t--format=prfmo -r prfmo\tSpecifies the output order (symetric/effort-based/oriented)"); + System.out.println("\t--format=seo -r seo\tSpecifies the extended measure used (symetric/effort-based/oriented)"); System.out.println("\t--dominant=algo -s algo\tSpecifies if dominant columns are algorithms or measure"); System.out.println("\t--type=html|xml|tex|ascii -t html|xml|tex|ascii\tSpecifies the output format"); System.out.println("\t--list=algo1,...,algon -l algo1,...,algon\tSequence of the filenames to consider"); diff --git a/src/fr/inrialpes/exmo/align/util/GenPlot.java b/src/fr/inrialpes/exmo/align/util/GenPlot.java index b19230bb837114f3dd4a22729f7f2e3c59f30873..f7967e7f48b9bad5ea04bcc93db908031b2b07a7 100644 --- a/src/fr/inrialpes/exmo/align/util/GenPlot.java +++ b/src/fr/inrialpes/exmo/align/util/GenPlot.java @@ -3,14 +3,9 @@ * * Copyright (C) 2003 The University of Manchester * Copyright (C) 2003 The University of Karlsruhe - * Copyright (C) 2003-2005, INRIA Rhône-Alpes + * Copyright (C) 2003-2006, INRIA Rhône-Alpes * Copyright (C) 2004, Université de Montréal * - * Modifications to the initial code base are copyright of their - * respective authors, or their employers as appropriate. Authorship - * of the modifications may be determined from the ChangeLog placed at - * the end of this file. - * * 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 the Free Software Foundation; either version 2.1 of @@ -295,12 +290,12 @@ public class GenPlot { public static void printPGFTex( double[][] result ){ int i = 0; String marktable[] = { "+", "*", "x", "-", "|", "o", "asterisk", "star", "oplus", "oplus*", "otimes", "otimes*", "square", "square*", "triangle", "triangle*", "diamond", "diamond*", "pentagon", "pentagon*"}; - String colortable[] = { "black", "white", "red", "green", "blue", "cyan", "magenta", "yellow" } ; + String colortable[] = { "black", "red", "green", "blue", "cyan", "magenta", "yellow" } ; output.println("\\documentclass[11pt]{book}"); output.println(); - output.println("\\usepackage{pgflibraryplotmarks}"); output.println("\\usepackage{pgf}"); output.println("\\usepackage{tikz}"); + output.println("\\usepackage{pgflibraryplotmarks}"); output.println(); output.println("\\begin{document}"); output.println("\\date{today}"); @@ -327,19 +322,25 @@ public class GenPlot { output.println("\\begin{tikzpicture}[cap=round]"); output.println("% Draw grid"); output.println("\\draw[step="+(STEP/10)+"cm,very thin,color=gray] (-0.2,-0.2) grid ("+STEP+","+STEP+");"); - output.println("\\draw[->] (-0.2,0) -- (10.2,0) node[below] {$recall$}; "); + output.println("\\draw[->] (-0.2,0) -- (10.2,0);"); + output.println("\\draw (5,-0.3) node {$recall$}; "); output.println("\\draw (0,-0.3) node {0.}; "); output.println("\\draw (10,-0.3) node {1.}; "); - output.println("\\draw[->] (0,-0.2) -- (0,10.2) node[above] {$precision$}; "); + output.println("\\draw[->] (0,-0.2) -- (0,10.2);"); output.println("\\draw (-0.3,0) node {0.}; "); + output.println("\\draw (-0.3,5) node[rotate=90] {$precision$}; "); output.println("\\draw (-0.3,10) node {1.}; "); output.println("% Plots"); for ( Enumeration e = listAlgo.elements() ; e.hasMoreElements() ; i++) { - output.println("\\draw["+colortable[i%8]+"] plot[mark="+marktable[i%20]+",smooth] file {"+(String)e.nextElement()+".table};"); - //output.println("\\draw plot[mark=+,smooth] file {"+(String)e.nextElement()+".table};"); + output.println("\\draw["+colortable[i%7]+"] plot[mark="+marktable[i%19]+",smooth] file {"+(String)e.nextElement()+".table};"); } // And a legend output.println("% Legend"); + i = 0; + for ( Enumeration e = listAlgo.elements() ; e.hasMoreElements() ; i++) { + output.println("\\draw["+colortable[i%7]+"] plot[mark="+marktable[i%19]+",smooth] coordinates {("+((i%3)*3+1)+","+(-(i/3)*.8-1)+") ("+((i%3)*3+3)+","+(-(i/3)*.8-1)+")};"); + output.println("\\draw["+colortable[i%7]+"] ("+((i%3)*3+2)+","+(-(i/3)*.8-.8)+") node {"+(String)e.nextElement()+"};"); + } output.println("\\end{tikzpicture}"); output.println(); output.println("\\end{document}"); @@ -361,8 +362,8 @@ public class GenPlot { writer.println("%% Include in PGF tex by:\n"); writer.println("%% \\begin{tikzpicture}[cap=round]"); writer.println("%% \\draw[step="+(STEP/10)+"cm,very thin,color=gray] (-0.2,-0.2) grid ("+STEP+","+STEP+");"); - writer.println("%% \\draw[->] (-0.2,0) -- (10.2,0) node[right] {$precision$}; "); - writer.println("%% \\draw[->] (0,-0.2) -- (0,10.2) node[above] {$recall$}; "); + writer.println("%% \\draw[->] (-0.2,0) -- (10.2,0) node[right] {$recall$}; "); + writer.println("%% \\draw[->] (0,-0.2) -- (0,10.2) node[above] {$precision$}; "); writer.println("%% \\draw plot[mark=+,smooth] file {"+algo+".table};"); writer.println("%% \\end{tikzpicture}"); writer.println(); diff --git a/src/fr/inrialpes/exmo/align/util/GroupEval.java b/src/fr/inrialpes/exmo/align/util/GroupEval.java index 9570d4b2a65d74a767bee087c5550aab5936a4b4..7e2d8b75cb55a8f0751f62afb005a803428b105c 100644 --- a/src/fr/inrialpes/exmo/align/util/GroupEval.java +++ b/src/fr/inrialpes/exmo/align/util/GroupEval.java @@ -3,14 +3,9 @@ * * Copyright (C) 2003 The University of Manchester * Copyright (C) 2003 The University of Karlsruhe - * Copyright (C) 2003-2005, INRIA Rhône-Alpes + * Copyright (C) 2003-2006, INRIA Rhône-Alpes * Copyright (C) 2004, Université de Montréal * - * Modifications to the initial code base are copyright of their - * respective authors, or their employers as appropriate. Authorship - * of the modifications may be determined from the ChangeLog placed at - * the end of this file. - * * 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 the Free Software Foundation; either version 2.1 of @@ -103,6 +98,7 @@ public class GroupEval { static String format = "pr"; static int fsize = 2; static String type = "html"; + static boolean embedded = false; static String dominant = "s"; static Vector listAlgo = null; static int debug = 0; @@ -284,6 +280,14 @@ public class GroupEval { * This does not only print the results but compute the average as well */ public static void print( Vector result ) { + if ( type.equals("html") ) printHTML( result ); + else if ( type.equals("tex") ) printLATEX( result ); + } + + public static void printLATEX( Vector result ) { + } + + public static void printHTML( Vector result ) { // variables for computing iterative harmonic means int expected = 0; // expected so far int foundVect[]; // found so far @@ -301,7 +305,7 @@ public class GroupEval { writer = new PrintStream(new FileOutputStream( filename )); } // Print the header - writer.println("<html><head></head><body>"); + if ( embedded != true ) writer.println("<html><head></head><body>"); writer.println("<table border='2' frame='sides' rules='groups'>"); writer.println("<colgroup align='center' />"); // for each algo <td spancol='2'>name</td> @@ -442,7 +446,7 @@ public class GroupEval { } writer.println("</tr>"); writer.println("</tbody></table>"); - writer.println("</body></html>"); + if ( embedded != true ) writer.println("</body></html>"); writer.close(); } catch (Exception ex) { ex.printStackTrace(); diff --git a/src/fr/inrialpes/exmo/align/util/Procalign.java b/src/fr/inrialpes/exmo/align/util/Procalign.java index bfea9f0560146ff7f7afa4ba248094a8e2838762..050d9a72d8fb0e33276297c1669ff90d47044528 100644 --- a/src/fr/inrialpes/exmo/align/util/Procalign.java +++ b/src/fr/inrialpes/exmo/align/util/Procalign.java @@ -6,11 +6,6 @@ * Copyright (C) 2003-2006, INRIA Rhône-Alpes * Copyright (C) 2004, Université de Montréal * - * Modifications to the initial code base are copyright of their - * respective authors, or their employers as appropriate. Authorship - * of the modifications may be determined from the ChangeLog placed at - * the end of this file. - * * 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 the Free Software Foundation; either version 2.1 of