Terrier IR Platform
2.2.1

uk.ac.gla.terrier.evaluation
Class TRECQrelsInMemory.QrelsHashSet

java.lang.Object
  extended by uk.ac.gla.terrier.evaluation.TRECQrelsInMemory.QrelsHashSet
Enclosing class:
TRECQrelsInMemory

public static class TRECQrelsInMemory.QrelsHashSet
extends java.lang.Object

Models the set of relevant documents for one query.


Field Summary
 gnu.trove.THashSet<java.lang.String> nonRelDocnos
          The ids of the pooled non-relevant documents.
 java.lang.String queryid
          The identifier of the query.
 gnu.trove.TIntHashSet relGrade
          All relevance grades indicated in the qrels.
 gnu.trove.TIntObjectHashMap<gnu.trove.THashSet<java.lang.String>> relGradeDocnosMap
          A hashmap from the relevance grade to a hashset containing ids of documents with the given relevance grade.
 
Constructor Summary
TRECQrelsInMemory.QrelsHashSet(java.lang.String queryid)
          Creates the an instance of the class with a given query identifier.
 
Method Summary
 java.lang.Object clone()
          Creates a clone of the current instance of the class.
 gnu.trove.THashSet<java.lang.String> getAllRelevantDocuments()
          Get all relevant documents regardless of their relevance grades.
 java.lang.String[] getAllRelevantDocumentsToArray()
          Get all relevant documents regardless of their relevance grades.
 gnu.trove.THashSet<java.lang.String> getRelevantDocuments(int grade)
          Get the relevant documents for a given relevance grade.
 java.lang.String[] getRelevantDocumentsToArray(int grade)
          Get the relevant documents for a given relevance grade.
 void insertNonRelDocno(java.lang.String docno)
           
 void insertRelDocno(java.lang.String docno, int grade)
          Add an identifier of a relevant document with its relevance grade.
 boolean isRelevant(java.lang.String docno)
          Check if a given document is relevant to the associated query.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queryid

public java.lang.String queryid
The identifier of the query.


relGrade

public gnu.trove.TIntHashSet relGrade
All relevance grades indicated in the qrels.


nonRelDocnos

public gnu.trove.THashSet<java.lang.String> nonRelDocnos
The ids of the pooled non-relevant documents.


relGradeDocnosMap

public gnu.trove.TIntObjectHashMap<gnu.trove.THashSet<java.lang.String>> relGradeDocnosMap
A hashmap from the relevance grade to a hashset containing ids of documents with the given relevance grade.

Constructor Detail

TRECQrelsInMemory.QrelsHashSet

public TRECQrelsInMemory.QrelsHashSet(java.lang.String queryid)
Creates the an instance of the class with a given query identifier.

Parameters:
queryid - String the query identifier.
Method Detail

clone

public java.lang.Object clone()
Creates a clone of the current instance of the class.

Overrides:
clone in class java.lang.Object
Returns:
Object the clone of the current object.

isRelevant

public boolean isRelevant(java.lang.String docno)
Check if a given document is relevant to the associated query.

Parameters:
docno - The identifier of the given document.
Returns:
Returns true if the document is relevant, false otherwise.

getAllRelevantDocumentsToArray

public java.lang.String[] getAllRelevantDocumentsToArray()
Get all relevant documents regardless of their relevance grades.

Returns:
The identifiers of all relevant documents.

getAllRelevantDocuments

public gnu.trove.THashSet<java.lang.String> getAllRelevantDocuments()
Get all relevant documents regardless of their relevance grades.

Returns:
The identifiers of all relevant documents.

getRelevantDocumentsToArray

public java.lang.String[] getRelevantDocumentsToArray(int grade)
Get the relevant documents for a given relevance grade.

Parameters:
grade - The given relevance grade.
Returns:
The identifiers of the relevant documents with the given relevance grade.

getRelevantDocuments

public gnu.trove.THashSet<java.lang.String> getRelevantDocuments(int grade)
Get the relevant documents for a given relevance grade.

Parameters:
grade - The given relevance grade.
Returns:
The identifiers of the relevant documents with the given relevance grade.

insertRelDocno

public void insertRelDocno(java.lang.String docno,
                           int grade)
Add an identifier of a relevant document with its relevance grade.

Parameters:
docno - The identifier of the given relevant document.
grade - The relevance grade of the given relevant document.

insertNonRelDocno

public void insertNonRelDocno(java.lang.String docno)

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow