nltk.StackDecoder.__init__

StackDecoder.__init__(phrase_table, language_model)[source]
Parameters:
  • phrase_table (PhraseTable) – Table of translations for source language phrases and the log probabilities for those translations.
  • language_model (object) – Target language model. Must define a probability_change method that calculates the change in log probability of a sentence, if a given string is appended to it. This interface is experimental and will likely be replaced with nltk.model once it is implemented.