lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r835674 - in /lucene/java/trunk/contrib/benchmark: CHANGES.txt src/java/org/apache/lucene/benchmark/quality/trec/QueryDriver.java
Date Fri, 13 Nov 2009 00:41:53 GMT
Author: rmuir
Date: Fri Nov 13 00:41:53 2009
New Revision: 835674

URL: http://svn.apache.org/viewvc?rev=835674&view=rev
Log:
LUCENE-2058: specify trec_eval output file from commandline

Modified:
    lucene/java/trunk/contrib/benchmark/CHANGES.txt
    lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/QueryDriver.java

Modified: lucene/java/trunk/contrib/benchmark/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/CHANGES.txt?rev=835674&r1=835673&r2=835674&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/CHANGES.txt (original)
+++ lucene/java/trunk/contrib/benchmark/CHANGES.txt Fri Nov 13 00:41:53 2009
@@ -4,6 +4,11 @@
 
 $Id:$
 
+11/12/2009
+  LUCENE-2058: specify trec_eval submission output from the command line.
+  Previously, 4 arguments were required, but the third was unused. The 
+  third argument is now the desired location of submission.txt  (Robert Muir)
+
 11/08/2009
   LUCENE-2044: Added delete.percent.rand.seed to seed the Random instance
   used by DeleteByPercentTask.  (Mike McCandless)

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/QueryDriver.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/QueryDriver.java?rev=835674&r1=835673&r2=835674&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/QueryDriver.java
(original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/QueryDriver.java
Fri Nov 13 00:41:53 2009
@@ -38,10 +38,18 @@
  **/
 public class QueryDriver {
   public static void main(String[] args) throws Exception {
-
+    if (args.length != 4) {
+      System.err.println("Usage: QueryDriver <topicsFile> <qrelsFile> <submissionFile>
<indexDir>");
+      System.err.println("topicsFile: input file containing queries");
+      System.err.println("qrelsFile: input file containing relevance judgements");
+      System.err.println("submissionFile: output submission file for trec_eval");
+      System.err.println("indexDir: index directory");
+      System.exit(1);
+    }
     
     File topicsFile = new File(args[0]);
     File qrelsFile = new File(args[1]);
+    SubmissionReport submitLog = new SubmissionReport(new PrintWriter(args[2]), "lucene");
     FSDirectory dir = FSDirectory.open(new File(args[3]));
     Searcher searcher = new IndexSearcher(dir, true);
 
@@ -66,7 +74,6 @@
     // run the benchmark
     QualityBenchmark qrun = new QualityBenchmark(qqs, qqParser, searcher, docNameField);
     qrun.setMaxResults(maxResults);
-    SubmissionReport submitLog = null;
     QualityStats stats[] = qrun.execute(judge, submitLog, logger);
 
     // print an avarage sum of the results



Mime
View raw message