org.apache.lucene.search.similarities

Class DFISimilarity

    • Constructor Detail

      • DFISimilarity

        public DFISimilarity(Independence independenceMeasure)
        Create DFI with the specified divergence from independence measure
        Parameters:
        independenceMeasure - measure of divergence from independence
    • Method Detail

      • score

        protected float score(BasicStats stats,
                              float freq,
                              float docLen)
        Description copied from class: SimilarityBase
        Scores the document doc.

        Subclasses must apply their scoring formula in this class.

        Specified by:
        score in class SimilarityBase
        Parameters:
        stats - the corpus level statistics.
        freq - the term frequency.
        docLen - the document length.
        Returns:
        the score.
      • toString

        public String toString()
        Description copied from class: SimilarityBase
        Subclasses must override this method to return the name of the Similarity and preferably the values of parameters (if any) as well.
        Specified by:
        toString in class SimilarityBase