Class Probability


  • public class Probability
    extends Object
    Probability, but doesn't check for a range of 0 to 1.
    Since:
    3.2
    • Constructor Detail

      • Probability

        public Probability​(double prob,
                           float coverage,
                           long occurrences)
      • Probability

        public Probability​(double prob,
                           float coverage)
    • Method Detail

      • getProb

        public double getProb()
        A probability-like value, but can be filled with any float >= 0.
      • getLogProb

        public double getLogProb()
      • getCoverage

        public float getCoverage()
        The fraction of lookups that had occurrence counts > 0. This might be used to ignore the whole probability for low coverage items.
      • getOccurrences

        public long getOccurrences()
        The number the longest ngram occurs in the corpus. Maybe be -1 if not known.