Class Null

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

    public class Null
    extends WeightingModel
    A weighting model that returns 0 for each match.
    See Also:
    Serialized Form
    • Constructor Detail

      • Null

        public Null()
    • Method Detail

      • getInfo

        public java.lang.String getInfo()
        Description copied from class: WeightingModel
        Returns the name of the model.
        Specified by:
        getInfo in interface Model
        Specified by:
        getInfo in class WeightingModel
        Returns:
        java.lang.String
      • score

        public double score​(double tf,
                            double docLength)
        Description copied from class: WeightingModel
        This method provides the contract for implementing weighting models.
        Specified by:
        score in class WeightingModel
        Parameters:
        tf - The term frequency in the document
        docLength - the document's length
        Returns:
        the score assigned to a document with the given tf and docLength, and other preset parameters