class_docstr: Container for a translated sentence.
  
  Attributes:
      src (LongTensor): Source word IDs.
      srclen (List[int]): Source lengths.
      pred_sents (List[List[str]]): Words from the n-best translations.
      pred_scores (List[List[float]]): Log-probs of n-best translations.
      attns (List[FloatTensor]) : Attention distribution for each
          translation.
      gold_sent (List[str]): Words from gold translation.
      gold_score (List[float]): Log-prob of gold translation.
      word_aligns (List[FloatTensor]): Words Alignment distribution for
          each translation.
code: def __init__(
      self,
      src,
      srclen,
      pred_sents,
      attn,
      pred_scores,
      tgt_sent,
      gold_score,
      word_aligns,
      ind_in_bucket,
  ):
      self.src = src
      self.srclen = srclen
      self.pred_sents = pred_sents
      self.attns = attn
      self.pred_scores = pred_scores
      self.gold_sent = tgt_sent
      self.gold_score = gold_score
      self.word_aligns = word_aligns
      self.ind_in_bucket = ind_in_bucket
  
file_path: OpenNMT-py/onmt/translate/translation.py
imports: import os
  from onmt.constants import DefaultTokens
  from onmt.utils.alignment import build_align_pharaoh
label_desc: Use image node_id 1 to create a new Translation object from inherited base classes: object with example: obj = Translation(src, srclen, pred_sents, attn, pred_scores, tgt_sent, gold_score, word_aligns, ind_in_bucket)