|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terrier.matching.models.WeightingModel
org.terrier.matching.models.PerFieldNormWeightingModel
public class PerFieldNormWeightingModel
A class for generating arbitrary per-field normalisation models. Per-field normalisation models are field-based models - i.e. they take into account the frequency of a term in each individual field of the document. In particular, they apply length normalisation on the frequency from each field, before using a linear combination of term frequencies to garner the final frequency.
Properties:
<ul>
| Field Summary |
|---|
| Fields inherited from class org.terrier.matching.models.WeightingModel |
|---|
averageDocumentLength, c, documentFrequency, i, keyFrequency, numberOfDocuments, numberOfPointers, numberOfTokens, numberOfUniqueTerms, termFrequency |
| Constructor Summary | |
|---|---|
PerFieldNormWeightingModel(java.lang.Class<? extends BasicModel> _basicModel,
java.lang.Class<? extends Normalisation> _normalisationModel)
Constructs an instance of PerFieldNormWeightingModel |
|
PerFieldNormWeightingModel(java.lang.String[] parameters)
Constructs an instance of PerFieldNormWeightingModel |
|
| Method Summary | |
|---|---|
java.lang.String |
getInfo()
Returns the name of the model. |
void |
prepare()
prepare |
double |
score(double tf,
double docLength)
This method provides the contract for implementing weighting models. |
double |
score(double tf,
double docLength,
double n_t,
double F_t,
double keyFrequency)
This method provides the contract for implementing weighting models. |
double |
score(Posting _p)
Returns score |
void |
setCollectionStatistics(CollectionStatistics _cs)
Sets collection statistics |
void |
setEntryStatistics(EntryStatistics _es)
Sets entry statistics. |
| Methods inherited from class org.terrier.matching.models.WeightingModel |
|---|
clone, getOverflowed, getParameter, setAverageDocumentLength, setDocumentFrequency, setKeyFrequency, setNumberOfDocuments, setNumberOfPointers, setNumberOfTokens, setNumberOfUniqueTerms, setParameter, setRequest, setTermFrequency, stirlingPower |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PerFieldNormWeightingModel(java.lang.Class<? extends BasicModel> _basicModel,
java.lang.Class<? extends Normalisation> _normalisationModel)
throws java.lang.Exception
_basicModel - _normalisationModel -
java.lang.Exception
public PerFieldNormWeightingModel(java.lang.String[] parameters)
throws java.lang.Exception
parameters -
java.lang.Exception| Method Detail |
|---|
public void prepare()
WeightingModel
prepare in class WeightingModelpublic double score(Posting _p)
WeightingModel
score in class WeightingModelpublic void setCollectionStatistics(CollectionStatistics _cs)
WeightingModel
setCollectionStatistics in class WeightingModelpublic void setEntryStatistics(EntryStatistics _es)
WeightingModel
setEntryStatistics in class WeightingModelpublic java.lang.String getInfo()
WeightingModel
getInfo in interface ModelgetInfo in class WeightingModel
public double score(double tf,
double docLength)
WeightingModel
score in class WeightingModeltf - The term frequency in the documentdocLength - the document's length
public double score(double tf,
double docLength,
double n_t,
double F_t,
double keyFrequency)
WeightingModel
score in class WeightingModeltf - The term frequency in the documentdocLength - the document's lengthn_t - The document frequency of the termF_t - the term frequency in the collectionkeyFrequency - the term frequency in the query
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||