class_docstr: Translation (Sequence Generation) task for Levenshtein Transformer
  See `"Levenshtein Transformer" <https://arxiv.org/abs/1905.11006>`_.
class_docstr_tok: ["Translation","(","Sequence","Generation",")","task","for","Levenshtein","Transformer","See","`","``","Levenshtein","Transformer","''","<","https",":","\/\/arxiv.org\/abs\/1905.11006",">","`","_","."]
code: def setup_task(cls, args, **kwargs):
      args.left_pad_source = options.eval_bool(args.left_pad_source)
      source_dict = pytorch_translate_dictionary.Dictionary.load(
          args.source_vocab_file
      )
      target_dict = pytorch_translate_dictionary.Dictionary.load(
          args.target_vocab_file
      )
      source_lang = args.source_lang or "src"
      target_lang = args.target_lang or "tgt"
      args.append_bos = True
  
      print(f"| [{source_lang}] dictionary: {len(source_dict)} types")
      print(f"| [{target_lang}] dictionary: {len(target_dict)} types")
  
      return cls(args, source_dict, target_dict)
  
file_path: translate/pytorch_translate/tasks/translation_lev_task.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from fairseq import options
  from fairseq.tasks import register_task
  from fairseq.tasks.translation_lev import TranslationLevenshteinTask
  from pytorch_translate.data import dictionary
  from pytorch_translate.tasks.pytorch_translate_task import PytorchTranslateTask
label_desc: Use image node_id 5 for calling the PytorchTranslationLevenshteinTask obj's underlying member method code with example usage: obj.setup_task(cls, args) and returns: cls