Class BaseLanguageModel

    • Constructor Detail

      • BaseLanguageModel

        public BaseLanguageModel()
    • Method Detail

      • getPseudoProbabilityStupidBackoff

        public Probability getPseudoProbabilityStupidBackoff​(List<String> context)
      • getPseudoProbability

        public Probability getPseudoProbability​(List<String> context)
        Description copied from interface: LanguageModel
        This is not always guaranteed to be a real probability (0.0 to 1.0). Throws exception if context is longer than the ngram index supports.
        Specified by:
        getPseudoProbability in interface LanguageModel
      • getCount

        public abstract long getCount​(String token1)
        Get the occurrence count for token.
      • getCount

        public abstract long getCount​(List<String> tokens)
        Get the occurrence count for the given token sequence.
      • getTotalTokenCount

        public abstract long getTotalTokenCount()