ir.vsr
Class Feedback

java.lang.Object
  extended by ir.vsr.Feedback

public class Feedback
extends java.lang.Object

Gets and stores information about relevance feedback from the user and computes an updated query based on original query and retrieved documents that are rated relevant and irrelevant.


Field Summary
static double ALPHA
          A Rochio/Ide algorithm parameter
 java.util.ArrayList<DocumentReference> badDocRefs
          The list of DocumentReference's that were rated irrelevant
static double BETA
          A Rochio/Ide algorithm parameter
static double GAMMA
          A Rochio/Ide algorithm parameter
 java.util.ArrayList<DocumentReference> goodDocRefs
          The list of DocumentReference's that were rated relevant
 InvertedIndex invertedIndex
          The current InvertedIndex
 HashMapVector queryVector
          The original query vector for this query
 Retrieval[] retrievals
          The current list of ranked retrievals
 
Constructor Summary
Feedback(HashMapVector queryVector, Retrieval[] retrievals, InvertedIndex invertedIndex)
          Create a feedback object for this query with initial retrievals to be rated
 
Method Summary
 void addBad(DocumentReference docRef)
          Add a document to the list of those deemed irrelevant
 void addGood(DocumentReference docRef)
          Add a document to the list of those deemed relevant
 void getFeedback(int showNumber)
          Prompt the user for feedback on this numbered retrieval
 boolean haveFeedback(int showNumber)
          Has the user already provided feedback on this numbered retrieval?
 boolean isEmpty()
          Has the user rated any documents yet?
 HashMapVector newQuery()
          Use the Ide_regular algorithm to compute a new revised query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALPHA

public static double ALPHA
A Rochio/Ide algorithm parameter


BETA

public static double BETA
A Rochio/Ide algorithm parameter


GAMMA

public static double GAMMA
A Rochio/Ide algorithm parameter


queryVector

public HashMapVector queryVector
The original query vector for this query


retrievals

public Retrieval[] retrievals
The current list of ranked retrievals


invertedIndex

public InvertedIndex invertedIndex
The current InvertedIndex


goodDocRefs

public java.util.ArrayList<DocumentReference> goodDocRefs
The list of DocumentReference's that were rated relevant


badDocRefs

public java.util.ArrayList<DocumentReference> badDocRefs
The list of DocumentReference's that were rated irrelevant

Constructor Detail

Feedback

public Feedback(HashMapVector queryVector,
                Retrieval[] retrievals,
                InvertedIndex invertedIndex)
Create a feedback object for this query with initial retrievals to be rated

Method Detail

addGood

public void addGood(DocumentReference docRef)
Add a document to the list of those deemed relevant


addBad

public void addBad(DocumentReference docRef)
Add a document to the list of those deemed irrelevant


isEmpty

public boolean isEmpty()
Has the user rated any documents yet?


getFeedback

public void getFeedback(int showNumber)
Prompt the user for feedback on this numbered retrieval


haveFeedback

public boolean haveFeedback(int showNumber)
Has the user already provided feedback on this numbered retrieval?


newQuery

public HashMapVector newQuery()
Use the Ide_regular algorithm to compute a new revised query.

Returns:
The revised query vector.