class_docstr: Problem spec for WMT En-Zh translation.
  
  Attempts to use full training dataset, which needs website
  registration and downloaded manually from official sources:
  
  CWMT:
    - http://nlp.nju.edu.cn/cwmt-wmt/
    - Website contains instructions for FTP server access.
    - You'll need to download CASIA, CASICT, DATUM2015, DATUM2017,
        NEU datasets
  
  UN Parallel Corpus:
    - https://conferences.unite.un.org/UNCorpus
    - You'll need to register your to download the dataset.
  
  NOTE: place into tmp directory e.g. /tmp/t2t_datagen/dataset.tgz
code: def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split):
      train = dataset_split == problem.DatasetSplit.TRAIN
      train_dataset = self.get_training_dataset(tmp_dir)
      datasets = train_dataset if train else _NC_TEST_DATASETS
      source_datasets = [
          [item[0], [item[1][0]]] for item in train_dataset
      ]
      target_datasets = [
          [item[0], [item[1][1]]] for item in train_dataset
      ]
      source_vocab = generator_utils.get_or_generate_vocab(
          data_dir,
          tmp_dir,
          self.source_vocab_name,
          self.approx_vocab_size,
          source_datasets,
          file_byte_budget=1e8,
          max_subtoken_length=self.max_subtoken_length,
      )
      target_vocab = generator_utils.get_or_generate_vocab(
          data_dir,
          tmp_dir,
          self.target_vocab_name,
          self.approx_vocab_size,
          target_datasets,
          file_byte_budget=1e8,
          max_subtoken_length=self.max_subtoken_length,
      )
      tag = "train" if train else "dev"
      filename_base = "wmt_enzh_%sk_tok_%s" % (
          self.approx_vocab_size,
          tag,
      )
      data_path = translate.compile_data(
          tmp_dir, datasets, filename_base
      )
      return text_problems.text2text_generate_encoded(
          text_problems.text2text_txt_iterator(
              data_path + ".lang1", data_path + ".lang2"
          ),
          source_vocab,
          target_vocab,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.data_generators import translate
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 5 for calling the TranslateEnzhWmt32k obj's underlying member method code with example usage: obj.generate_encoded_samples(data_dir, tmp_dir, dataset_split) and returns: text_problems