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

Mailing List Archive: Lucene: Java-User

please I n eed small clarificat ion about precision and recall in lucene codež

 

 

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


tmooh11 at hotmail

May 6, 2012, 5:43 AM

Post #1 of 2 (95 views)
Permalink
please I n eed small clarificat ion about precision 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


rcmuir at gmail

May 6, 2012, 4:38 PM

Post #2 of 2 (90 views)
Permalink
Re: please I need small clarification about precision and recall in lucene codeā€ [In reply to]

On Sun, May 6, 2012 at 8:43 AM, Abeer I <tmooh11 [at] hotmail> wrote:
> 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.
>
>

topics are basically queries, representation of some information need.

qrels are relevance judgements, mapping which documents are relevant
to which query.

You can find more basic information at
http://trec.nist.gov/data/test_coll.html, or in Lucene In Action 2 (I
think there is an example of how to use this there)


--
lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

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.