':param phrase_table: Table of translations for source language
phrases and the log probabilities for those translations.
:type phrase_table: PhraseTable
:param language_model: 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.
:type language_model: object'

def __init__(self, phrase_table, language_model):

    self.phrase_table = phrase_table
    self.language_model = language_model
    self.word_penalty = 0.0
    '\n                                float:    Influences    the    translation    length    exponentially.\n                                                If    positive,    shorter    translations    are    preferred.\n                                                If    negative,    longer    translations    are    preferred.\n                                                If    zero,    no    penalty    is    applied.\n                                '
    self.beam_threshold = 0.0
    '\n                                float:    Hypotheses    that    score    below    this    factor    of    the    best\n                                                hypothesis    in    a    stack    are    dropped    from    consideration.\n                                                Value    between    0.0    and    1.0.\n                                '
    self.stack_size = 100
    '\n                                int:    Maximum    number    of    hypotheses    to    consider    in    a    stack.\n                                                Higher    values    increase    the    likelihood    of    a    good    translation,\n                                                but    increases    processing    time.\n                                '
    self.__distortion_factor = 0.5
    self.__compute_log_distortion()
