|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.matching.models.languagemodel.LanguageModel uk.ac.gla.terrier.matching.models.languagemodel.PonteCroft
public class PonteCroft
This class implements Ponte & Croft's language modelling approach.
Constructor Summary | |
---|---|
PonteCroft()
The default constructor. |
Method Summary | |
---|---|
double |
averageTermGenerationProbability(int[] tf,
double[] docLength)
The method computes the average term generation probability of a term in vocabulary. |
java.lang.String |
getInfo()
Returns the name of the model. |
double |
risk(double tf,
double docLength,
double termEstimate)
The method computes the risk of retrieving a seen query term. |
double |
scoreSeenNonQuery(double tf,
double docLength,
double termFrequency,
double termEstimate)
The method assigns score for a seen non-query term. |
double |
scoreSeenQuery(double tf,
double docLength,
double termFrequency,
double termEstimate)
The method assigns score for a seen query term. |
double |
scoreUnseenNonQuery(double termFrequency)
The method assigns score for a unseen non-query term. |
double |
scoreUnseenQuery(double termFrequency)
The method assigns score for a unseen query term. |
void |
setAverageDocumentLength(double a)
Set the average document length in the collection. |
void |
setNumberOfPointers(double n)
|
void |
setNumberOfTokens(double value)
Set the number of tokens in the whole collection. |
void |
setNumberOfUniqueTerms(double n)
Set the number of unique terms in the collection. |
Methods inherited from class uk.ac.gla.terrier.matching.models.languagemodel.LanguageModel |
---|
getParameter, setNumberOfDocuments, setParameter, setTermFrequency |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PonteCroft()
Method Detail |
---|
public java.lang.String getInfo()
getInfo
in interface Model
getInfo
in class LanguageModel
public double scoreSeenQuery(double tf, double docLength, double termFrequency, double termEstimate)
scoreSeenQuery
in class LanguageModel
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 double scoreSeenNonQuery(double tf, double docLength, double termFrequency, double termEstimate)
scoreSeenNonQuery
in class LanguageModel
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 double scoreUnseenQuery(double termFrequency)
scoreUnseenQuery
in class LanguageModel
termFrequency
- The term frequency in the collection.
public double scoreUnseenNonQuery(double termFrequency)
scoreUnseenNonQuery
in class LanguageModel
termFrequency
- The term frequency in the collection.
public double risk(double tf, double docLength, double termEstimate)
risk
in class LanguageModel
tf
- The within-document frequency.docLength
- The length of the weighted document.termEstimate
- The term estimate of the query term.
public double averageTermGenerationProbability(int[] tf, double[] docLength)
averageTermGenerationProbability
in class LanguageModel
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 setNumberOfTokens(double value)
Model
value
- The number of tokens in the whole collection.public void setAverageDocumentLength(double a)
Model
a
- The average document length in the collection.public void setNumberOfUniqueTerms(double n)
Model
n
- double The number of unique terms in the collection.public void setNumberOfPointers(double n)
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |