Class PerFieldNormWeightingModel

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Model
    Direct Known Subclasses:
    BM25F, PL2F

    public class PerFieldNormWeightingModel
    extends WeightingModel
    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:

    • w.fieldId (starting at 0)
    • c.fieldId (starting at 0)
    Since:
    3.0
    Author:
    Craig Macdonald
    See Also:
    Serialized Form
    • Field Detail

      • params

        protected java.lang.String[] params
      • fieldNormalisations

        protected Normalisation[] fieldNormalisations
      • fieldGlobalFrequencies

        protected double[] fieldGlobalFrequencies
      • fieldWeights

        protected double[] fieldWeights
      • fieldCount

        protected int fieldCount
    • Constructor Detail

      • PerFieldNormWeightingModel

        public PerFieldNormWeightingModel​(java.lang.Class<? extends BasicModel> _basicModel,
                                          java.lang.Class<? extends Normalisation> _normalisationModel)
                                   throws java.lang.Exception
        Constructs an instance of PerFieldNormWeightingModel
        Parameters:
        _basicModel -
        _normalisationModel -
        Throws:
        java.lang.Exception
      • PerFieldNormWeightingModel

        public PerFieldNormWeightingModel​(java.lang.String[] parameters)
                                   throws java.lang.Exception
        Constructs an instance of PerFieldNormWeightingModel
        Parameters:
        parameters -
        Throws:
        java.lang.Exception