public class DFRWeightingModel extends WeightingModel
Examples:
| Modifier and Type | Field and Description | 
|---|---|
| protected AfterEffect | afterEffectThe applied model for after effect (aka. | 
| protected String | AFTEREFFECT_PREFIXThe prefix of the package of the first normalisation methods by after effect. | 
| protected BasicModel | basicModelThe applied basic model for randomness. | 
| protected String | BASICMODEL_PREFIXThe prefix of the package of the basic models for randomness. | 
| protected boolean | ENABLE_AFTEREFFECTA boolean that indicates if the first normalisation by after effect
 is enabled. | 
| protected boolean | ENABLE_NORMALISATIONA boolean that indicates if the frequency normalisation is enabled. | 
| protected static org.slf4j.Logger | logger | 
| protected Normalisation | normalisationThe applied frequency normalisation method. | 
| protected String | NORMALISATION_PREFIXThe prefix of the package of the frequency normalisation methods. | 
| protected double | parameterThe parameter of the frequency normalisation component. | 
averageDocumentLength, c, cs, documentFrequency, es, i, keyFrequency, numberOfDocuments, numberOfPointers, numberOfTokens, numberOfUniqueTerms, rq, termFrequency| Constructor and Description | 
|---|
| DFRWeightingModel(String[] components)The default constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| DFRWeightingModel | clone()Clone this weighting model | 
| String | getInfo()Returns the name of the model. | 
| double | getParameter()Return the parameter set by setParameter() | 
| protected void | initialise(String basicModelName,
          String afterEffectName,
          String normalisationName)Initialise the components in the DFR model. | 
| protected void | initialise(String basicModelName,
          String afterEffectName,
          String normalisationName,
          double _parameter)Initialise the components in the DFR model. | 
| double | score(double tf,
     double docLength)Compute a weight for a term in a document. | 
| void | setCollectionStatistics(CollectionStatistics _cs)Sets collection statistics | 
| void | setEntryStatistics(EntryStatistics _es)Sets entry statistics. | 
| void | setParameter(double value)Set the frequency normalisation parameter. | 
getOverflowed, prepare, score, setKeyFrequency, setRequestprotected static final org.slf4j.Logger logger
protected BasicModel basicModel
protected AfterEffect afterEffect
protected Normalisation normalisation
protected final String NORMALISATION_PREFIX
protected final String BASICMODEL_PREFIX
protected final String AFTEREFFECT_PREFIX
protected double parameter
protected boolean ENABLE_NORMALISATION
protected boolean ENABLE_AFTEREFFECT
public DFRWeightingModel(String[] components)
components - Corresponds to the names of the 3 DFR weighting models component
 names, as passed to initialise().public DFRWeightingModel clone()
WeightingModelclone in class WeightingModelprotected void initialise(String basicModelName, String afterEffectName, String normalisationName)
basicModelName - The name of the applied basic model for randomness. This
 component must be specified and can NOT be an empty string.afterEffectName - The name of the applied first normalisation by after
 effect. An empty string to disable this component.normalisationName - The name of the applied frequency normalisation
 component. An empty string to disable this component.protected void initialise(String basicModelName, String afterEffectName, String normalisationName, double _parameter)
basicModelName - The name of the applied basic model for randomness. This
 component must be specified and can NOT be an empty string.afterEffectName - The name of the applied first normalisation by after
 effect. An empty string to disable this component.normalisationName - The name of the applied frequency normalisation
 component. An empty string to disable this component._parameter - The applied parameter value of the frequency normalisation.public void setParameter(double value)
setParameter in interface ModelsetParameter in class WeightingModelvalue - The given parameter value.public double getParameter()
getParameter in interface ModelgetParameter in class WeightingModelpublic final String getInfo()
getInfo in interface ModelgetInfo in class WeightingModelpublic final double score(double tf,
                          double docLength)
score in class WeightingModeltf - The term frequency in the documentdocLength - the document's lengthpublic void setCollectionStatistics(CollectionStatistics _cs)
WeightingModelsetCollectionStatistics in class WeightingModelpublic void setEntryStatistics(EntryStatistics _es)
setEntryStatistics in class WeightingModelTerrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow