lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abeer I <>
Subject please I need small clarification about precision and recall in lucene code‏
Date Sun, 06 May 2012 12:43:52 GMT

I want to ask about the lucene.benchmark which I used it to mauser the precision and recall
in my lucene code .

basically I used this code 

File topicsFile = new File("C:\\test\\topicfile.txt");  
    File qrelsFile = new File("C:\\test\\qrles.txt");  
        try (Directory dir = File("C:\\luceneIndex"))) {
           // searcher = new IndexSearcher(dir, true); 

   searcher= new IndexSearcher(dir, true);
            String docNameField = "filename";   
            PrintWriter logger = new PrintWriter(System.out, true);   
            TrecTopicsReader qReader = new TrecTopicsReader();   //#1  
            QualityQuery qqs[] = qReader.readQueries( new BufferedReader(new FileReader(topicsFile)));
            Judge judge = new TrecJudge(new BufferedReader(new FileReader(qrelsFile)));  
            judge.validateData(qqs, logger);                     //#3  
            QualityQueryParser qqParser = new SimpleQQParser("content", "path");  //#4  
            QualityBenchmark qrun = new QualityBenchmark(qqs, qqParser, searcher, docNameField);

            SubmissionReport submitLog = null;  
            QualityStats stats[] = qrun.execute(judge,submitLog, logger);  
            QualityStats avg = QualityStats.average(stats);      //#6  
            avg.log("SUMMARY",2,logger, "  ");
the topic file format is 
<num> Number: 0
<title> Financial
<desc> Description:
<narr> Narrative:

and qrles is
# qnum 0 doc-name is-relevant

0 0 enwiki-20120403-pages-articles.xml-007.txt 1

 any one describe what is the meaning of these two file I tried to 
search for recourse that help me with this matter but unfortunately 
nothing helpful. 

how to write these two file (topic file,qrles ) is it don manually, if so what is the meaning
of the file structure.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message