|
Terrier IR Platform 1.1.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.gla.terrier.matching.models.languagemodel.LanguageModel
public abstract class LanguageModel
This class should be extended by the classes used for weighting documents using language modelling.
| Constructor Summary | |
|---|---|
LanguageModel()
A default constructor that initialises the idf i attribute |
|
| Method Summary | |
|---|---|
abstract double |
averageTermGenerationProbability(int[] tf,
double[] docLength)
The method provides the contract for computing the average term generation probability of a term in vocabulary. |
abstract java.lang.String |
getInfo()
Returns the name of the model. |
double |
getParameter()
Returns the current value of the parameter set using setParameter() method. |
abstract double |
risk(double tf,
double docLength,
double termEstimate)
The method provides the contract for computing the risk of retrieving a seen query term. |
abstract double |
scoreSeenNonQuery(double tf,
double docLength,
double termFrequency,
double termEstimate)
The method provides the contract for assgining score for a seen non-query term. |
abstract double |
scoreSeenQuery(double tf,
double docLength,
double termFrequency,
double termEstimate)
The method provides the contract for assigning score for a seen query term. |
abstract double |
scoreUnseenNonQuery(double termFrequency)
The method provides the contract for assigning score for a unseen non-query term. |
abstract double |
scoreUnseenQuery(double termFrequency)
The method provides the contract for assigning score for a unseen query term. |
void |
setNumberOfDocuments(double numOfDocs)
Sets the number of documents in the collection. |
void |
setParameter(double param)
This method is empty. |
void |
setTermFrequency(double termFreq)
Sets the term's frequency in the collection. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface uk.ac.gla.terrier.matching.Model |
|---|
setAverageDocumentLength, setNumberOfPointers, setNumberOfTokens, setNumberOfUniqueTerms |
| Constructor Detail |
|---|
public LanguageModel()
| Method Detail |
|---|
public abstract java.lang.String getInfo()
getInfo in interface Model
public abstract double scoreSeenQuery(double tf,
double docLength,
double termFrequency,
double termEstimate)
tf - The within-document frequency.docLength - The length of the weighted document.termFrequency - The term frequency in the collection.termEstimate - The term estimate of the query term.
public abstract double scoreSeenNonQuery(double tf,
double docLength,
double termFrequency,
double termEstimate)
tf - The within-document frequency.docLength - The length of the weighted document.termFrequency - The term frequency in the collection.termEstimate - The term estimate of the query term.
public abstract double scoreUnseenQuery(double termFrequency)
termFrequency - The term frequency in the collection.
public abstract double scoreUnseenNonQuery(double termFrequency)
termFrequency - The term frequency in the collection.
public abstract double risk(double tf,
double docLength,
double termEstimate)
tf - The within-document frequency.docLength - The length of the weighted document.termEstimate - The term estimate of the query term.
public abstract double averageTermGenerationProbability(int[] tf,
double[] docLength)
tf - An array of within-document frequency of a query term in all documents
where it occurs.docLength - The length of all the documents where the term occurs.
public void setNumberOfDocuments(double numOfDocs)
setNumberOfDocuments in interface ModelnumOfDocs - the number of documents in the collection.public void setTermFrequency(double termFreq)
termFreq - the term's frequency in the collection.public void setParameter(double param)
setParameter in interface Modelparam - double the parameter value.public double getParameter()
Model
getParameter in interface Model
|
Terrier IR Platform 1.1.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||