Class Normalisation0

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class Normalisation0
    extends Normalisation
    This class implements an empty normalisation. It does no frequency normalisation but returns the original frequency. In case of applying field retrieval, the returned value is the original frequency times the weight of the field.
    Author:
    Ben He
    See Also:
    Serialized Form
    • Field Detail

      • methodName

        protected final java.lang.String methodName
        The name of the normalisation method .
        See Also:
        Constant Field Values
    • Constructor Detail

      • Normalisation0

        public Normalisation0()
    • Method Detail

      • getInfo

        public java.lang.String getInfo()
        Get the name of the normalisation method.
        Specified by:
        getInfo in class Normalisation
        Returns:
        Return the name of the normalisation method.
      • normalise

        public double normalise​(double tf,
                                double docLength,
                                double termFrequency)
        This method returns the original term frequency. If field retrieval is applied, the returned value is the original frequency times the weight of the field.
        Specified by:
        normalise in class Normalisation
        Parameters:
        tf - The frequency of the query term in the document.
        docLength - The number of tokens in the document.
        termFrequency - The frequency of the query term in the collection.
        Returns:
        The normalised term frequency.