diff --git a/lib/align.jar b/lib/align.jar index b617a4c03e6f72ecf41cee79708d82e8667d6f0d..d64de955107d48f817e443ec91a0c063f7e7cc0b 100644 Binary files a/lib/align.jar and b/lib/align.jar differ diff --git a/lib/alignsvc.jar b/lib/alignsvc.jar index 79ee308336b33c1f79090e071bce3196e9b5d22b..02a704c0b030164bab51738c39eb99e8c2ca61eb 100644 Binary files a/lib/alignsvc.jar and b/lib/alignsvc.jar differ diff --git a/lib/alignwn.jar b/lib/alignwn.jar index 36c48297673541159fda01abb3ff46a46046c96a..e086c76dd2ba019029bbaffbe110a2508e2715ea 100644 Binary files a/lib/alignwn.jar and b/lib/alignwn.jar differ diff --git a/lib/procalign.jar b/lib/procalign.jar index 62aac3c435143583359ea73d4adb37380310aedb..5ac39934cef50cf9b253a24e7756baf4f7e94229 100644 Binary files a/lib/procalign.jar and b/lib/procalign.jar differ diff --git a/rdf/srcalign.owl b/rdf/srcalign.owl index 27d453ff6d521855356a2563b4e9b9254e20135a..5c4bbea031e76ced1c3586159d6bdf8954b47fc9 100644 --- a/rdf/srcalign.owl +++ b/rdf/srcalign.owl @@ -9,8 +9,8 @@ <type>11</type> <uri1>http://www.example.org/ontology1</uri1> <uri2>http://www.example.org/ontology2</uri2> - <onto1>file://./rdf/onto1.owl</onto1> - <onto2>file://./rdf/onto2.owl</onto2> + <onto1>file://localhost/Volumes/Phata/JAVA/alignapi/rdf/onto1.owl</onto1> + <onto2>file://localhost/Volumes/Phata/JAVA/alignapi/rdf/onto2.owl</onto2> <map> <Cell> <entity1 rdf:resource='http://www.example.org/ontology1#journalarticle'/> diff --git a/src/fr/inrialpes/exmo/align/util/GenPlot.java b/src/fr/inrialpes/exmo/align/util/GenPlot.java index f7967e7f48b9bad5ea04bcc93db908031b2b07a7..f634ae8a1d9decd3280879c8e9b868f07497e267 100644 --- a/src/fr/inrialpes/exmo/align/util/GenPlot.java +++ b/src/fr/inrialpes/exmo/align/util/GenPlot.java @@ -300,24 +300,6 @@ public class GenPlot { output.println("\\begin{document}"); output.println("\\date{today}"); output.println(""); - output.println("\\pgfuseplotmark{-}"); - output.println("\\pgfuseplotmark{|}"); - output.println("\\pgfuseplotmark{o}"); - output.println("\\pgfuseplotmark{asterisk}"); - output.println("\\pgfuseplotmark{star}"); - output.println("\\pgfuseplotmark{oplus}"); - output.println("\\pgfuseplotmark{oplus*}"); - output.println("\\pgfuseplotmark{otimes}"); - output.println("\\pgfuseplotmark{otimes*}"); - output.println("\\pgfuseplotmark{square}"); - output.println("\\pgfuseplotmark{square*}"); - output.println("\\pgfuseplotmark{triangle}"); - output.println("\\pgfuseplotmark{triangle*}"); - output.println("\\pgfuseplotmark{diamond}"); - output.println("\\pgfuseplotmark{diamond*}"); - output.println("\\pgfuseplotmark{pentagon}"); - output.println("\\pgfuseplotmark{pentagon*}"); - output.println(""); output.println("\n%% Plot generated by GenPlot of alignapi"); output.println("\\begin{tikzpicture}[cap=round]"); output.println("% Draw grid"); diff --git a/src/fr/inrialpes/exmo/align/util/GroupEval.java b/src/fr/inrialpes/exmo/align/util/GroupEval.java index 7e2d8b75cb55a8f0751f62afb005a803428b105c..426c58b596dcb90049fe78ff0edb14c89241174a 100644 --- a/src/fr/inrialpes/exmo/align/util/GroupEval.java +++ b/src/fr/inrialpes/exmo/align/util/GroupEval.java @@ -44,6 +44,7 @@ import java.io.FileOutputStream; import java.net.URI; import java.lang.Double; import java.lang.Integer; +import java.lang.Math; import java.util.Hashtable; import java.util.Vector; import java.util.Enumeration; @@ -282,6 +283,90 @@ public class GroupEval { public static void print( Vector result ) { if ( type.equals("html") ) printHTML( result ); else if ( type.equals("tex") ) printLATEX( result ); + else if ( type.equals("triangle") ) printTRIANGLE( result ); + } + + public static void printTRIANGLE( Vector result ) { + // variables for computing iterative harmonic means + int expected = 0; // expected so far + int foundVect[]; // found so far + int correctVect[]; // correct so far + long timeVect[]; // time so far + double hMeansPrec[]; // Precision H-means so far + double hMeansRec[]; // Recall H-means so far + foundVect = new int[ listAlgo.size() ]; + correctVect = new int[ listAlgo.size() ]; + timeVect = new long[ listAlgo.size() ]; + hMeansPrec = new double[ listAlgo.size() ]; + hMeansRec = new double[ listAlgo.size() ]; + for( int k = listAlgo.size()-1; k >= 0; k-- ) { + foundVect[k] = 0; + correctVect[k] = 0; + timeVect[k] = 0; + hMeansPrec[k] = 1.; + hMeansRec[k] = 1.; + } + for ( Enumeration e = result.elements() ; e.hasMoreElements() ;) { + int nexpected = -1; + int oexpected = 0; + Vector test = (Vector)e.nextElement(); + Enumeration f = test.elements(); + f.nextElement(); + for( int k = 0 ; f.hasMoreElements() ; k++) { + PRecEvaluator eval = (PRecEvaluator)f.nextElement(); + if ( eval != null ){ + // iterative H-means computation + if ( nexpected == -1 ){ + nexpected = eval.getExpected(); + oexpected = expected; + expected = oexpected + nexpected; + } + int nfound = eval.getFound(); + int ofound = foundVect[k]; + foundVect[k] = ofound + nfound; + int ncorrect = eval.getCorrect(); + int ocorrect = correctVect[k]; + correctVect[k] = ocorrect + ncorrect; + timeVect[k] += eval.getTime(); + } + } + } + System.out.println("\\documentclass[11pt]{book}"); + System.out.println(); + System.out.println("\\usepackage{pgf}"); + System.out.println("\\usepackage{tikz}"); + System.out.println(); + System.out.println("\\begin{document}"); + System.out.println("\\date{today}"); + System.out.println(""); + System.out.println("\n%% Plot generated by GenPlot of alignapi"); + System.out.println("\\begin{tikzpicture}[cap=round]"); + System.out.println("% Draw grid"); + System.out.println("\\draw[step=1cm,very thin,color=gray] (-0.2,-0.2) grid (10.0,9.0);"); + System.out.println("\\draw[|-|] (-0,0) -- (10,0);"); + System.out.println("%\\draw[dashed,very thin] (0,0) -- (5,8.66) -- (10,0);"); + System.out.println("\\draw[dashed,very thin] (10,0) arc (0:60:10cm);"); + System.out.println("\\draw[dashed,very thin] (0,0) arc (180:120:10cm);"); + + System.out.println("\\draw (0,-0.3) node {$recall$}; "); + System.out.println("\\draw (10,-0.3) node {$precision$}; "); + //System.out.println("\\draw (0,-0.3) node {0.}; "); + //System.out.println("\\draw (10,-0.3) node {1.}; "); + System.out.println("% Plots"); + int k = 0; + for ( Enumeration e = listAlgo.elements() ; e.hasMoreElements() ; k++) { + double precision = (double)correctVect[k]/foundVect[k]; + double recall = (double)correctVect[k]/expected; + double prec2 = precision*precision; + double a = ((prec2-(recall*recall)+1)/2); + double b = java.lang.Math.sqrt( prec2 - (a*a) ); + a = a*10; b = b*10; //for printing scale 10. + System.out.println("\\draw plot[mark=+,] coordinates {("+a+","+b+")};"); + System.out.println("\\draw ("+(a+.01)+","+(b+.01)+") node[anchor=south west] {"+(String)e.nextElement()+"};"); + } + System.out.println("\\end{tikzpicture}"); + System.out.println(); + System.out.println("\\end{document}"); } public static void printLATEX( Vector result ) { @@ -297,6 +382,8 @@ public class GroupEval { double hMeansRec[]; // Recall H-means so far PrintStream writer = null; fsize = format.length(); + // JE: the writer should be put out + // JE: the h-means computation should be put out as well try { // Print result if ( filename == null ) { @@ -480,7 +567,7 @@ public class GroupEval { System.out.println("\t--output=filename -o filename\tSpecifies a file to which the output will go"); System.out.println("\t--reference=filename -r filename\tSpecifies the name of the reference alignment file (default: refalign.rdf)"); - System.out.println("\t--type=html|xml|tex|ascii -t html|xml|tex|ascii\tSpecifies the output format"); + System.out.println("\t--type=html|xml|tex|ascii|triangle -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"); System.out.println("\t--color=color -c color\tSpecifies if the output must color even lines of the output"); System.out.println("\t--debug[=n] -d [n]\t\tReport debug info at level n");