public static class TRECQrelsInMemory.QrelsHashSet extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
gnu.trove.THashSet<String> |
nonRelDocnos
The ids of the pooled non-relevant documents.
|
String |
queryid
The identifier of the query.
|
gnu.trove.TIntHashSet |
relGrade
All relevance grades indicated in the qrels.
|
gnu.trove.TIntObjectHashMap<gnu.trove.THashSet<String>> |
relGradeDocnosMap
A hashmap from the relevance grade to a hashset containing ids of
documents with the given relevance grade.
|
Constructor and Description |
---|
TRECQrelsInMemory.QrelsHashSet(String _queryid)
Creates the an instance of the class with a given
query identifier.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a clone of the current instance of the class.
|
gnu.trove.THashSet<String> |
getAllRelevantDocuments()
Get all relevant documents regardless of their relevance grades.
|
String[] |
getAllRelevantDocumentsToArray()
Get all relevant documents regardless of their relevance grades.
|
int |
getGrade(String docno,
int def)
get grade
|
gnu.trove.THashSet<String> |
getRelevantDocuments(int grade)
Get the relevant documents for a given relevance grade.
|
String[] |
getRelevantDocumentsToArray(int grade)
Get the relevant documents for a given relevance grade.
|
void |
insertNonRelDocno(String docno)
insert non relevance docno into non-relevance list
|
void |
insertRelDocno(String docno,
int grade)
Add an identifier of a relevant document with its relevance grade.
|
boolean |
isRelevant(String docno)
Check if a given document is relevant to the associated query.
|
public String queryid
public gnu.trove.TIntHashSet relGrade
public gnu.trove.THashSet<String> nonRelDocnos
public gnu.trove.TIntObjectHashMap<gnu.trove.THashSet<String>> relGradeDocnosMap
public TRECQrelsInMemory.QrelsHashSet(String _queryid)
_queryid
- String the query identifier.public Object clone()
public boolean isRelevant(String docno)
docno
- The identifier of the given document.public int getGrade(String docno, int def)
docno
- def
- public String[] getAllRelevantDocumentsToArray()
public gnu.trove.THashSet<String> getAllRelevantDocuments()
public String[] getRelevantDocumentsToArray(int grade)
grade
- The given relevance grade.public gnu.trove.THashSet<String> getRelevantDocuments(int grade)
grade
- The given relevance grade.public void insertRelDocno(String docno, int grade)
docno
- The identifier of the given relevant document.grade
- The relevance grade of the given relevant document.public void insertNonRelDocno(String docno)
docno
- Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow