|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecthyspirit.application.retrieval.RankedList
public class RankedList
Interface for ranked result lists. Elements of the lists are of type hyspirit.application.retrieval.ResultItem. The ranked list is always sorted in ascending order of the retrieval weights of its result items.
Created on 05-Jun-2005 16:19:29
| Constructor Summary | |
|---|---|
RankedList()
|
|
| Method Summary | |
|---|---|
void |
add(ResultItem res)
Add a new result item to the ranking. |
int |
elementsLeft()
Returns the number of elements left in the ranking (i.e. fetchable with getNextElements()) |
java.util.List |
getFirstElements(int number)
Gets the first |
java.util.List |
getList()
Gets the whole ranked list, sorted in ascending order of the retrieval weight of its result item. |
java.util.List |
getNextElements(int number)
Gets the next |
java.util.List |
getRange(int begin,
int end)
Returns a range of the ranked list (including begin and end element). |
boolean |
hasNext()
Returns true if there are next elements to fetch, false otherwise |
static void |
main(java.lang.String[] args)
|
void |
parseHySpiritResult(java.lang.String hySpiritResult)
Parses the output of a hy_{pra|prd|fvpd} run and converts it into a ranked list. |
void |
parseHySpiritResult(java.util.Vector hySpiritResult)
Parses the output of a hy_{pra|prd|fvpd} run and converts it into a ranked list. |
void |
reset()
Resets the internal counter for getNextElements() to 0. |
void |
setWhitelist(java.util.HashSet<java.lang.String> whitelist)
A whitelist is a list of URIs you want to see in the ranking. |
int |
size()
The number of elements in the ranking |
void |
sort()
Sort the ranking. |
void |
writeTRECResult(java.lang.String filename,
java.lang.String queryID,
java.lang.String runID,
int limit,
boolean append,
boolean stripQuotationMarks)
Writes the ranked list into a TREC result file |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RankedList()
| Method Detail |
|---|
public java.util.List getList()
public java.util.List getNextElements(int number)
number - the number of next elements
public java.util.List getFirstElements(int number)
number - the number of next elements
public boolean hasNext()
public int elementsLeft()
public void reset()
public int size()
public java.util.List getRange(int begin,
int end)
begin - the beginning of the range (>= 1)end - the end of the range
public void add(ResultItem res)
res - the result item to addpublic void sort()
public void parseHySpiritResult(java.lang.String hySpiritResult)
throws HyTupleFormatException
hySpiritResult - the HySpirit result
HyTupleFormatExceptionpublic void parseHySpiritResult(java.util.Vector hySpiritResult)
hySpiritResult - the HySpirit result as a Vectorpublic void setWhitelist(java.util.HashSet<java.lang.String> whitelist)
?- term(T,D) & document(D)
In the above case, you should create a whitelist containing the URIs of
all documents, run the query
?- term(T,D)
and only documents fulfilling the query will be returned.
whitelist -
public void writeTRECResult(java.lang.String filename,
java.lang.String queryID,
java.lang.String runID,
int limit,
boolean append,
boolean stripQuotationMarks)
throws java.io.IOException
filename - the fiolename of the TREC result filequeryID - the TREC query IDrunID - the TREC run IDlimit - how many resulkt items to write; 0 for unlimitedappend - whether to append the result to an existing filestripQuotationMarks - whether or not to strip quotation marks from
result URIs
java.io.IOExceptionpublic static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||