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 double score​(BasicStats stats,
                               double freq,
                               double 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.
      • getIndependence

        public Independence getIndependence()
        Returns the measure of independence
      • 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