|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.evaluation.TRECQrelsInMemory
public class TRECQrelsInMemory
Loads the relevance assessments in memory, for performing evaluation of runs.
Nested Class Summary | |
---|---|
static class |
TRECQrelsInMemory.QrelsHashSet
Models the set of relevant documents for one query. |
Field Summary | |
---|---|
TRECQrelsInMemory.QrelsHashSet[] |
qrelsPerQuery
Each element in the array contains the docids of the relevant documents with respect to a query. |
int |
totalNumberOfRelevantDocs
The total number of relevant documents. |
Constructor Summary | |
---|---|
TRECQrelsInMemory()
A default constructor that creates an instance of the class and loads in memory the relevance assessments from the files that are specified in the file specified by the property TREC_QRELS. |
|
TRECQrelsInMemory(java.lang.String qrelsFilename)
A constructor that creates an instance of the class and loads in memory the relevance assessments from the given file. |
Method Summary | |
---|---|
gnu.trove.THashSet<java.lang.String> |
getAllRelevantDocuments()
Get the identifiers of all relevant documents in the pool. |
java.lang.String[] |
getAllRelevantDocumentsToArray()
Get the identifiers of all relevant documents in the pool. |
gnu.trove.THashSet<java.lang.String> |
getNonRelevantDocuments()
Get all the pooled non-relevant documents. |
gnu.trove.THashSet<java.lang.String> |
getNonRelevantDocuments(java.lang.String queryid)
Get the pooled non-relevant documents for the given query. |
java.lang.String[] |
getNonRelevantDocumentsToArray()
Get all the pooled non-relevant documents. |
java.lang.String[] |
getNonRelevantDocumentsToArray(java.lang.String queryid)
Get the pooled non-relevant documents for a given query. |
int |
getNumberOfQueries()
Returns the total number of queries contained in the loaded relevance assessments. |
int |
getNumberOfRelevant(java.lang.String queryid)
Returns the numbe of relevant documents for a given query. |
java.lang.String[] |
getQueryids()
Get ids of the queries that appear in the pool. |
gnu.trove.THashSet<java.lang.String> |
getRelevantDocuments(int grade)
Get the identifiers of all relevant documents in the pool with a given relevance grade. |
java.lang.String[] |
getRelevantDocuments(int[] grades)
Get the identifiers of all relevant documents with the given relevance grades. |
gnu.trove.THashSet<java.lang.String> |
getRelevantDocuments(java.lang.String queryid)
Get the pooled relevant documents for the given query. |
gnu.trove.THashSet<java.lang.String> |
getRelevantDocuments(java.lang.String queryid,
int grade)
Get the pooled relevant documents for the given query. |
gnu.trove.THashSet<java.lang.String> |
getRelevantDocuments(java.lang.String queryid,
int[] grades)
Get the pooled relevant documents for the given query. |
java.lang.String[] |
getRelevantDocumentsToArray(int grade)
Get the identifiers of all relevant documents in the pool with the given relevance grade. |
java.lang.String[] |
getRelevantDocumentsToArray(java.lang.String queryid)
Get the pooled relevant documents for a given query. |
java.lang.String[] |
getRelevantDocumentsToArray(java.lang.String queryid,
int grade)
Get the pooled relevant documents for a given query. |
java.lang.String[] |
getRelevantDocumentsToArray(java.lang.String queryid,
int[] grades)
Get the pooled relevant documents for the given query. |
boolean |
isRelevant(java.lang.String queryid,
java.lang.String docno)
Check if the given document is relevant for a given query. |
boolean |
queryExistInQrels(java.lang.String queryid)
Checks whether there is a query with a given identifier in the relevance assessments. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public TRECQrelsInMemory.QrelsHashSet[] qrelsPerQuery
public int totalNumberOfRelevantDocs
Constructor Detail |
---|
public TRECQrelsInMemory(java.lang.String qrelsFilename)
qrelsFilename
- String The full path of the qrels file to load.public TRECQrelsInMemory()
Method Detail |
---|
public java.lang.String[] getQueryids()
public java.lang.String[] getRelevantDocuments(int[] grades)
grades
- The relevance grades.
public gnu.trove.THashSet<java.lang.String> getAllRelevantDocuments()
public gnu.trove.THashSet<java.lang.String> getRelevantDocuments(int grade)
public java.lang.String[] getAllRelevantDocumentsToArray()
public java.lang.String[] getRelevantDocumentsToArray(int grade)
public gnu.trove.THashSet<java.lang.String> getNonRelevantDocuments(java.lang.String queryid)
queryid
- The id of the given query.
public gnu.trove.THashSet<java.lang.String> getNonRelevantDocuments()
public java.lang.String[] getNonRelevantDocumentsToArray()
public gnu.trove.THashSet<java.lang.String> getRelevantDocuments(java.lang.String queryid)
queryid
- The id of the given query.
public gnu.trove.THashSet<java.lang.String> getRelevantDocuments(java.lang.String queryid, int grade)
queryid
- The id of the given query.
public gnu.trove.THashSet<java.lang.String> getRelevantDocuments(java.lang.String queryid, int[] grades)
queryid
- The id of the given query.
public java.lang.String[] getRelevantDocumentsToArray(java.lang.String queryid, int[] grades)
queryid
- The id of the given query.
public java.lang.String[] getNonRelevantDocumentsToArray(java.lang.String queryid)
queryid
- The id of the given query.
public java.lang.String[] getRelevantDocumentsToArray(java.lang.String queryid)
queryid
- The id of the given query.
public java.lang.String[] getRelevantDocumentsToArray(java.lang.String queryid, int grade)
queryid
- The id of the given query.
public int getNumberOfQueries()
public int getNumberOfRelevant(java.lang.String queryid)
queryid
- String The identifier of a query.
public boolean queryExistInQrels(java.lang.String queryid)
queryid
- String the identifier of a query.
public boolean isRelevant(java.lang.String queryid, java.lang.String docno)
queryid
- String a query identifier.docno
- String a document identifier.
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |