it.unimi.dsi.mg4j.search.score
Class DocumentRankScorer

java.lang.Object
  extended byit.unimi.dsi.mg4j.search.score.DocumentRankScorer

public class DocumentRankScorer
extends Object

Compute scores that do not depend on intervals, but that just assign a fixed score to each document; scores are read from a file whose name is passed to the constructor.


Constructor Summary
DocumentRankScorer()
          Builds a document scorer that assigns the score 0 to all documents.
DocumentRankScorer(String filename, ProgressMeter pm)
          Builds a document scorer by first reading the ranks from a file.
 
Method Summary
 ScoredDocumentIterator scoredDocumentIterator(DocumentIterator d)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentRankScorer

public DocumentRankScorer()
Builds a document scorer that assigns the score 0 to all documents.


DocumentRankScorer

public DocumentRankScorer(String filename,
                          ProgressMeter pm)
                   throws IOException
Builds a document scorer by first reading the ranks from a file. Ranks are saved as doubles (the first double is the rank of document 0 and so on).

Parameters:
filename - the name of the rank file.
pm - the progress meter to be used while loading ranks, or null.
Method Detail

scoredDocumentIterator

public ScoredDocumentIterator scoredDocumentIterator(DocumentIterator d)