iglu.ir
Class DefaultIRPacket
java.lang.Object
|
+--iglu.ir.AbstractIRPacket
|
+--iglu.ir.DefaultIRPacket
- All Implemented Interfaces:
- IRPacket, java.io.Serializable
- public class DefaultIRPacket
- extends AbstractIRPacket
- implements java.io.Serializable
A description of an information retrieval task. The document set is
given by d, the queries by q, and the "correct"
answers by mapping. These packets are sent to
the PrecisionRecall object for testing. This is a simple implementation.
- Author:
- Travis Bauer
- See Also:
PrecisionRecall,
Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
docs
private DocumentSet docs
queries
private TermVector[] queries
qToDocs
private int[][] qToDocs
DefaultIRPacket
public DefaultIRPacket(DocumentSet d,
TermVector[] q,
int[][] mapping)
- Parameters:
d - The set of documents to query.q - The set of queries to test.mapping - The mapping from queries to documents. This
multdimensional array should be created so that
qToDoc[queryNum] is an array of integers indicating the
documents that should be retrieved for query queryNum.
These integers point into the document set. So
docs.getDoc(qToDoc[queryNum][x]) should always return
a document relevant to query queries[queryNum] for all
valid values of queryNum and x.
DefaultIRPacket
public DefaultIRPacket()
documentSet
public DocumentSet documentSet()
- Return the document set
- Specified by:
documentSet in interface IRPacket
allQueries
public TermVector[] allQueries()
- Get the queries
- Specified by:
allQueries in interface IRPacket
queryToDocMapping
public int[][] queryToDocMapping()
- Get the query to document matching
- Specified by:
queryToDocMapping in interface IRPacket