class_docstr: Mathematical language understanding, see arxiv.org/abs/1812.02825.
class_docstr_tok: ["Mathematical","language","understanding",",","see","arxiv.org\/abs\/1812.02825","."]
docstr: Downloads and extracts the dataset and generates examples.
  
  Args:
    data_dir: The base directory where data and vocab files are stored.
    tmp_dir: temp directory to download and extract the dataset.
    dataset_split: split of the data-set.
  
  Yields:
    The data examples.
docstr_tok: ["Downloads","and","extracts","the","dataset","and","generates","examples",".","Args",":","data_dir",":","The","base","directory","where","data","and","vocab","files","are","stored",".","tmp_dir",":","temp","directory","to","download","and","extract","the","dataset",".","dataset_split",":","split","of","the","data-set",".","Yields",":","The","data","examples","."]
code: def generate_samples(self, data_dir, tmp_dir, dataset_split):
      """Downloads and extracts the dataset and generates examples.
  
      Args:
        data_dir: The base directory where data and vocab files are stored.
        tmp_dir: temp directory to download and extract the dataset.
        dataset_split: split of the data-set.
  
      Yields:
        The data examples.
      """
      if not tf.gfile.Exists(tmp_dir):
          tf.gfile.MakeDirs(tmp_dir)
  
      if not tf.gfile.Exists(data_dir):
          tf.gfile.MakeDirs(data_dir)
  
      # Download and extract.
      download_path = _download_mlu_data(tmp_dir, data_dir)
      filepath = os.path.join(download_path, "symbolic_math_train.txt")
      with open(filepath, "r") as fp:
          for l in fp:
              prob, ans = l.strip().split(":")
              yield {"inputs": prob, "targets": ans}
  
file_path: tensor2tensor/tensor2tensor/data_generators/algorithmic_math_two_variables.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tarfile
  import requests
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling the AlgorithmicMathTwoVariables obj's underlying member method code with example usage: obj.generate_samples(data_dir, tmp_dir, dataset_split) without return types