Class AbstractNgramLanguageModel<W>

java.lang.Object
edu.berkeley.nlp.lm.AbstractNgramLanguageModel<W>
All Implemented Interfaces:
NgramLanguageModel<W>, Serializable
Direct Known Subclasses:
AbstractArrayEncodedNgramLanguageModel, AbstractContextEncodedNgramLanguageModel

public abstract class AbstractNgramLanguageModel<W> extends Object implements NgramLanguageModel<W>, Serializable
See Also:
  • Field Details

    • lmOrder

      protected final int lmOrder
    • oovWordLogProb

      protected float oovWordLogProb
      Fixed constant returned when computing the log probability for an n-gram whose last word is not in the vocabulary. Note that this is different from the log prob of the unk tag probability.
  • Constructor Details

    • AbstractNgramLanguageModel

      public AbstractNgramLanguageModel(int lmOrder, WordIndexer<W> wordIndexer, float oovWordLogProb)
  • Method Details