class_docstr: Build a word-based translation from the batch output
  of translator and the underlying dictionaries.
  
  Replacement based on "Addressing the Rare Word
  Problem in Neural Machine Translation" :cite:`Luong2015b`
  
  Args:
     data ():
     vocabs ():
     n_best (int): number of translations produced
     replace_unk (bool): replace unknown words using attention
code: def __init__(
      self, vocabs, n_best=1, replace_unk=False, phrase_table=""
  ):
      self.vocabs = vocabs
      self.n_best = n_best
      self.replace_unk = replace_unk
      self.phrase_table_dict = {}
      if phrase_table != "" and os.path.exists(phrase_table):
          with open(phrase_table) as phrase_table_fd:
              for line in phrase_table_fd:
                  phrase_src, phrase_trg = line.rstrip("\n").split(
                      DefaultTokens.PHRASE_TABLE_SEPARATOR
                  )
                  self.phrase_table_dict[phrase_src] = phrase_trg
  
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 TranslationBuilder object from inherited base classes: object with example: obj = TranslationBuilder(vocabs, n_best, replace_unk, phrase_table)