Interface NgramLanguageModel<W>

    • Method Detail

      • getLmOrder

        int getLmOrder()
        Maximum size of n-grams stored by the model.
        Returns:
      • getWordIndexer

        WordIndexer<W> getWordIndexer()
        Each LM must have a WordIndexer which assigns integer IDs to each word W in the language.
        Returns:
      • scoreSentence

        float scoreSentence​(java.util.List<W> sentence)
        Scores a complete sentence, taking appropriate care with the start- and end-of-sentence symbols. This is a convenience method and will generally be inefficient.
        Returns:
      • setOovWordLogProb

        void setOovWordLogProb​(float logProb)
        Sets the (log) probability for an OOV word. Note that this is in general different from the log prob of the unk tag probability.