class_docstr: Partial solution to a translation.
  
  Records the word positions of the phrase being translated, its
  translation, raw score, and the cost of the untranslated parts of
  the sentence. When the next phrase is selected to build upon the
  partial solution, a new _Hypothesis object is created, with a back
  pointer to the previous hypothesis.
  
  To find out which words have been translated so far, look at the
  ``src_phrase_span`` in the hypothesis chain. Similarly, the
  translation output can be found by traversing up the chain.
class_docstr_tok: ["Partial","solution","to","a","translation",".","Records","the","word","positions","of","the","phrase","being","translated",",","its","translation",",","raw","score",",","and","the","cost","of","the","untranslated","parts","of","the","sentence",".","When","the","next","phrase","is","selected","to","build","upon","the","partial","solution",",","a","new","_Hypothesis","object","is","created",",","with","a","back","pointer","to","the","previous","hypothesis",".","To","find","out","which","words","have","been","translated","so","far",",","look","at","the","``","src_phrase_span","``","in","the","hypothesis","chain",".","Similarly",",","the","translation","output","can","be","found","by","traversing","up","the","chain","."]
docstr: :param raw_score: Likelihood of hypothesis so far.
      Higher is better. Does not account for untranslated words.
  :type raw_score: float
  
  :param src_phrase_span: Span of word positions covered by the
      source phrase in this hypothesis expansion. For example,
      (2, 5) means that the phrase is from the second word up to,
      but not including the fifth word in the source sentence.
  :type src_phrase_span: tuple(int)
  
  :param trg_phrase: Translation of the source phrase in this
      hypothesis expansion
  :type trg_phrase: tuple(str)
  
  :param previous: Previous hypothesis before expansion to this one
  :type previous: _Hypothesis
  
  :param future_score: Approximate score for translating the
      remaining words not covered by this hypothesis. Higher means
      that the remaining words are easier to translate.
  :type future_score: float
docstr_tok: [":","param","raw_score",":","Likelihood","of","hypothesis","so","far",".","Higher","is","better",".","Does","not","account","for","untranslated","words",".",":","type","raw_score",":","float",":","param","src_phrase_span",":","Span","of","word","positions","covered","by","the","source","phrase","in","this","hypothesis","expansion",".","For","example",",","(","2",",","5",")","means","that","the","phrase","is","from","the","second","word","up","to",",","but","not","including","the","fifth","word","in","the","source","sentence",".",":","type","src_phrase_span",":","tuple","(","int",")",":","param","trg_phrase",":","Translation","of","the","source","phrase","in","this","hypothesis","expansion",":","type","trg_phrase",":","tuple","(","str",")",":","param","previous",":","Previous","hypothesis","before","expansion","to","this","one",":","type","previous",":","_Hypothesis",":","param","future_score",":","Approximate","score","for","translating","the","remaining","words","not","covered","by","this","hypothesis",".","Higher","means","that","the","remaining","words","are","easier","to","translate",".",":","type","future_score",":","float"]
code: def __init__(
      self,
      raw_score=0.0,
      src_phrase_span=(),
      trg_phrase=(),
      previous=None,
      future_score=0.0,
  ):
      """
      :param raw_score: Likelihood of hypothesis so far.
          Higher is better. Does not account for untranslated words.
      :type raw_score: float
  
      :param src_phrase_span: Span of word positions covered by the
          source phrase in this hypothesis expansion. For example,
          (2, 5) means that the phrase is from the second word up to,
          but not including the fifth word in the source sentence.
      :type src_phrase_span: tuple(int)
  
      :param trg_phrase: Translation of the source phrase in this
          hypothesis expansion
      :type trg_phrase: tuple(str)
  
      :param previous: Previous hypothesis before expansion to this one
      :type previous: _Hypothesis
  
      :param future_score: Approximate score for translating the
          remaining words not covered by this hypothesis. Higher means
          that the remaining words are easier to translate.
      :type future_score: float
      """
      self.raw_score = raw_score
      self.src_phrase_span = src_phrase_span
      self.trg_phrase = trg_phrase
      self.previous = previous
      self.future_score = future_score
  
imports: import warnings
  from collections import defaultdict
  from math import log
label_desc: Use image node_id 1 to create a new _Hypothesis object  with example: obj = _Hypothesis(raw_score, src_phrase_span, trg_phrase, previous, future_score)