class_docstr: Same as TranslationTask except use the MaskedLMDictionary class so that
  we can load data that was binarized with the MaskedLMDictionary class.
  
  This task should be used for the entire training pipeline when we want to
  train an NMT model from a pretrained XLM checkpoint: binarizing NMT data,
  training NMT with the pretrained XLM checkpoint, and subsequent evaluation
  of that trained model.
class_docstr_tok: ["Same","as","TranslationTask","except","use","the","MaskedLMDictionary","class","so","that","we","can","load","data","that","was","binarized","with","the","MaskedLMDictionary","class",".","This","task","should","be","used","for","the","entire","training","pipeline","when","we","want","to","train","an","NMT","model","from","a","pretrained","XLM","checkpoint",":","binarizing","NMT","data",",","training","NMT","with","the","pretrained","XLM","checkpoint",",","and","subsequent","evaluation","of","that","trained","model","."]
docstr: Build the dictionary
  
  Args:
      filenames (list): list of filenames
      workers (int): number of concurrent workers
      threshold (int): defines the minimum word count
      nwords (int): defines the total number of words in the final dictionary,
          including special symbols
      padding_factor (int): can be used to pad the dictionary size to be a
          multiple of 8, which is important on some hardware (e.g., Nvidia
          Tensor Cores).
docstr_tok: ["Build","the","dictionary","Args",":","filenames","(","list",")",":","list","of","filenames","workers","(","int",")",":","number","of","concurrent","workers","threshold","(","int",")",":","defines","the","minimum","word","count","nwords","(","int",")",":","defines","the","total","number","of","words","in","the","final","dictionary",",","including","special","symbols","padding_factor","(","int",")",":","can","be","used","to","pad","the","dictionary","size","to","be","a","multiple","of","8",",","which","is","important","on","some","hardware","(","e.g.",",","Nvidia","Tensor","Cores",")","."]
code: def build_dictionary(
      cls,
      filenames,
      workers=1,
      threshold=-1,
      nwords=-1,
      padding_factor=8,
  ):
      """Build the dictionary
  
      Args:
          filenames (list): list of filenames
          workers (int): number of concurrent workers
          threshold (int): defines the minimum word count
          nwords (int): defines the total number of words in the final dictionary,
              including special symbols
          padding_factor (int): can be used to pad the dictionary size to be a
              multiple of 8, which is important on some hardware (e.g., Nvidia
              Tensor Cores).
      """
      d = MaskedLMDictionary()
      for filename in filenames:
          MaskedLMDictionary.add_file_to_dictionary(
              filename, d, tokenizer.tokenize_line, workers
          )
      d.finalize(
          threshold=threshold,
          nwords=nwords,
          padding_factor=padding_factor,
      )
      return d
  
file_path: translate/pytorch_translate/tasks/translation_from_pretrained_xlm.py
imports: from fairseq import options, tokenizer
  from fairseq.tasks import register_task
  from pytorch_translate import constants
  from pytorch_translate.data.masked_lm_dictionary import MaskedLMDictionary
  from pytorch_translate.tasks.pytorch_translate_task import PytorchTranslateTask
label_desc: Use image node_id 3 for calling the PytorchTranslateTranslationFromPretrainedXLMTask obj's underlying member method code with example usage: obj.build_dictionary(cls, filenames, workers, threshold, nwords, padding_factor) and returns: d