def get_wmt_enfr_train_set(directory):
  train_path = os.path.join(directory, "giga-fren.release2")
  if not (gfile.Exists(train_path +".fr") and gfile.Exists(train_path +".en")):
    corpus_file = maybe_download(directory, "training-giga-fren.tar",
                                 _WMT_ENFR_TRAIN_URL)
    print("Extracting tar file %s" % corpus_file)
    with tarfile.open(corpus_file, "r") as corpus_tar:
      corpus_tar.extractall(directory)
    gunzip_file(train_path + ".fr.gz", train_path + ".fr")
    gunzip_file(train_path + ".en.gz", train_path + ".en")
  return train_path
Download the WMT en-fr training corpus to directory unless it's there.
dataset/ETHPy150Open tokestermw/tensorflow-shakespeare/tensorshake/translate/data_utils.py/get_wmt_enfr_train_set