Terrier IR Platform
2.2.1

uk.ac.gla.terrier.structures
Class ExpansionTerms.ExpansionTerm

java.lang.Object
  extended by uk.ac.gla.terrier.structures.ExpansionTerms.ExpansionTerm
Enclosing class:
ExpansionTerms

public static class ExpansionTerms.ExpansionTerm
extends java.lang.Object

This class implements a data structure for a term in the top-retrieved documents.


Constructor Summary
ExpansionTerms.ExpansionTerm(int termID, double withinDocumentFrequency)
          The constructor of ExpansionTerm.
 
Method Summary
 int getDocumentFrequency()
          The method returns the document frequency of term in the top-retrieved documents.
 int getTermID()
          Returns the ID of the term.
 double getWeightExpansion()
          The method returns the expansion weight of the term.
 double getWithinDocumentFrequency()
          The method returns the frequency of the term in the X top-retrieved documents.
 void insertRecord(double withinDocumentFrequency)
          If the term is found in another top-retrieved document, we increase the frequency and the document frequency of the term.
 void setWeightExpansion(double weightExpansion)
          Sets the expansion weight of the term.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpansionTerms.ExpansionTerm

public ExpansionTerms.ExpansionTerm(int termID,
                                    double withinDocumentFrequency)
The constructor of ExpansionTerm. Once the term is found in a top- retrieved documents, we create a record for this term.

Parameters:
termID - int the ID of the term
withinDocumentFrequency - double the frequency of the term in a top-retrieved document
Method Detail

getTermID

public int getTermID()
Returns the ID of the term.

Returns:
int the term ID.

insertRecord

public void insertRecord(double withinDocumentFrequency)
If the term is found in another top-retrieved document, we increase the frequency and the document frequency of the term.

Parameters:
withinDocumentFrequency - double the frequency of the term in the corresponding top-retrieved document.

setWeightExpansion

public void setWeightExpansion(double weightExpansion)
Sets the expansion weight of the term.

Parameters:
weightExpansion - double the expansion weight of the term.

getDocumentFrequency

public int getDocumentFrequency()
The method returns the document frequency of term in the top-retrieved documents.

Returns:
int The document frequency of term in the top-retrieved documents.

getWeightExpansion

public double getWeightExpansion()
The method returns the expansion weight of the term.

Returns:
double The expansion weight of the term.

getWithinDocumentFrequency

public double getWithinDocumentFrequency()
The method returns the frequency of the term in the X top-retrieved documents.

Returns:
double The expansion weight of the term.

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow