iglu.ir
Interface IRPacket

All Known Implementing Classes:
AbstractIRPacket

public interface IRPacket

An interface for information needed in Information Retrieval Tests. It provides a set of documents, a set of queries and a way of knowing which documents go with which queries.

Author:
Travis Bauer
See Also:
PrecisionRecall

Method Summary
 TermVector[] allQueries()
          A set of queries for this packet
 java.lang.String[] allQueryTerms()
          Return an array of all the terms occurring in the the queries.
 int[] docsForQuery(int queryNum, int num)
          Given a query number (index into array returned by allQueries()), return an index into the document set of all the documents which should be retrieved for the given query.
 DocumentSet documentSet()
          The set of documents for this packet
 int[][] queryToDocMapping()
          A map from the array returned by allQueries() to the document set.
 int[] relatedDocs(int docNum)
          Given an index into the document set, return all the documents that are "related" to that document.
 

Method Detail

documentSet

public DocumentSet documentSet()
The set of documents for this packet


allQueries

public TermVector[] allQueries()
A set of queries for this packet


docsForQuery

public int[] docsForQuery(int queryNum,
                          int num)
Given a query number (index into array returned by allQueries()), return an index into the document set of all the documents which should be retrieved for the given query.


relatedDocs

public int[] relatedDocs(int docNum)
Given an index into the document set, return all the documents that are "related" to that document. What "related" means in up to the particular implementation.


queryToDocMapping

public int[][] queryToDocMapping()
A map from the array returned by allQueries() to the document set. The first index refers to the query number. The second index refers to the document number. So queryToDocMapping[x][y] where x=0 to allQueries().length and y=0 to the number of relevant documents for this query


allQueryTerms

public java.lang.String[] allQueryTerms()
Return an array of all the terms occurring in the the queries.