Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

please I need small clerafation about precition and recall in lucene code

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


tmooh11 at hotmail

May 6, 2012, 5:17 AM

Post #1 of 1 (115 views)
Permalink
please I need small clerafation about precition and recall in lucene code

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 = FSDirectory.open(new File("C:\\luceneIndex"))) {
// org.apache.lucene.search.Searcher searcher = new IndexSearcher(dir, true);
org.apache.lucene.search.IndexSearcher 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))); //#1
Judge judge = new TrecJudge(new BufferedReader(new FileReader(qrelsFile))); //#2
judge.validateData(qqs, logger); //#3
QualityQueryParser qqParser = new SimpleQQParser("content", "path"); //#4

QualityBenchmark qrun = new QualityBenchmark(qqs, qqParser, searcher, docNameField);
//org.apache.lucene.benchmark.quality.QualityQuery[],org.apache.lucene.benchmark.quality.QualityQueryParser,org.apache.lucene.search.IndexSearcher,java.lang.String
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
<top>
<num> Number: 0
<title> Financial
<desc> Description:
<narr> Narrative:
</top>

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

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

can 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.


thanks

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.