QUERY
- Type of queryDOCUMENT
- Type of documentpublic class TRECEvalAnalyser<QUERY,DOCUMENT extends Identifiable> extends Object implements RetrievalAnalyser<TRECResult,QUERY,DOCUMENT>
RetrievalAnalyser
that uses the trec_eval commandline tool to
perform the analysis.Constructor and Description |
---|
TRECEvalAnalyser()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
TRECResult |
analyse(Map<QUERY,List<DOCUMENT>> results,
Map<QUERY,Set<DOCUMENT>> relevant)
Analyse ranked results from a
RetrievalEngine against a
ground-truth set of relevant results and produce an
AnalysisResult which can be read by a human. |
static <Q,D extends Identifiable> |
writeQRELS(Map<Q,Set<D>> relevant,
PrintStream os)
Write the ground-truth data in TREC QRELS format.
|
static <Q,D extends Identifiable> |
writeTop(Map<Q,List<D>> results,
PrintStream os)
Write retrieval results in TREC TOP format.
|
public TRECEvalAnalyser()
public TRECResult analyse(Map<QUERY,List<DOCUMENT>> results, Map<QUERY,Set<DOCUMENT>> relevant)
RetrievalAnalyser
RetrievalEngine
against a
ground-truth set of relevant results and produce an
AnalysisResult
which can be read by a human.analyse
in interface RetrievalAnalyser<TRECResult,QUERY,DOCUMENT extends Identifiable>
results
- the results per query from the RetrievalEngine
.relevant
- the ground-truth relevant documents per query.public static <Q,D extends Identifiable> void writeTop(Map<Q,List<D>> results, PrintStream os)
Q
- Type of queryD
- Type of Documentresults
- the ranked results.os
- stream to write topublic static <Q,D extends Identifiable> void writeQRELS(Map<Q,Set<D>> relevant, PrintStream os)
Q
- Type of queryD
- Type of Documentrelevant
- the relevant docs for each queryos
- stream to write to