nltk.StackDecoder.expansion_score

StackDecoder.expansion_score(hypothesis, translation_option, src_phrase_span)[source]

Calculate the score of expanding hypothesis with translation_option

Parameters:
  • hypothesis (_Hypothesis) – Hypothesis being expanded
  • translation_option (PhraseTableEntry) – Information about the proposed expansion
  • src_phrase_span (tuple(int, int)) – Word position span of the source phrase