anl.aida.core
Interface ScoredTermCallback

All Known Implementing Classes:
STCWriter, TermsTest.TestTermCallback

public interface ScoredTermCallback

Interface for classes that want to be notified of "events" while iterating through a ScoredTermsCollection in term order.


Method Summary
 void apply(int docIndex, MIFSDocument doc, int frequency, float score)
          Notifies the implementor of a document score for the term specified in the last call to newTerm.
 void newTerm(int termIndex, MIFSTerm term)
          Called when a new term is encountered during iteration.
 

Method Detail

newTerm

void newTerm(int termIndex,
             MIFSTerm term)
Called when a new term is encountered during iteration.

Parameters:
termIndex - the index of the term in the collection
term - the term itself

apply

void apply(int docIndex,
           MIFSDocument doc,
           int frequency,
           float score)
           throws AIDAException
Notifies the implementor of a document score for the term specified in the last call to newTerm.

Parameters:
docIndex - the index of the document for which this is the term score
doc - the document itself
frequency - the frequency count of the term in the document
score - the term score for the document
Throws:
AIDAException - if there is an error during the callback.