Interface LanguageModel

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String GOOGLE_SENTENCE_END
      ngram sentence end marker - note: this is not in the v1 data from Google
      static java.lang.String GOOGLE_SENTENCE_START
      ngram sentence start marker - note: this is not in the v1 data from Google
    • Field Detail

      • GOOGLE_SENTENCE_START

        static final java.lang.String GOOGLE_SENTENCE_START
        ngram sentence start marker - note: this is not in the v1 data from Google
        See Also:
        Constant Field Values
      • GOOGLE_SENTENCE_END

        static final java.lang.String GOOGLE_SENTENCE_END
        ngram sentence end marker - note: this is not in the v1 data from Google
        See Also:
        Constant Field Values
    • Method Detail

      • getPseudoProbability

        Probability getPseudoProbability​(java.util.List<java.lang.String> context)
        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.
        Since:
        3.2
      • close

        void close()
        Specified by:
        close in interface java.lang.AutoCloseable