class_docstr: This class loads in the Facebook bAbI dataset and vectorizes them into stories,
  questions, and answers as described in:
  "Towards AI-Complete Question Answering: A Set of Prerequisite Toy Tasks"
  http://arxiv.org/abs/1502.05698.
class_docstr_tok: ["This","class","loads","in","the","Facebook","bAbI","dataset","and","vectorizes","them","into","stories",",","questions",",","and","answers","as","described","in",":","''","Towards","AI-Complete","Question","Answering",":","A","Set","of","Prerequisite","Toy","Tasks","''","http",":","\/\/arxiv.org\/abs\/1502.05698","."]
docstr: Fetch the Facebook bAbI dataset and load it to memory.
  
  Arguments:
      path (str, optional): Local directory in which to cache the raw
                            dataset.  Defaults to current directory.
      task (str, optional): bAbI task to load
      subset (str, optional): Data comes in English, Hindi, or Shuffled
                              characters. Options are 'en', 'hn', and
                              'shuffled' for 1000 training and test
                              examples or 'en-10k', 'hn-10k', and
                              'shuffled-10k' for 10000 examples.
  Returns:
      tuple: training and test files are returned
docstr_tok: ["Fetch","the","Facebook","bAbI","dataset","and","load","it","to","memory",".","Arguments",":","path","(","str",",","optional",")",":","Local","directory","in","which","to","cache","the","raw","dataset",".","Defaults","to","current","directory",".","task","(","str",",","optional",")",":","bAbI","task","to","load","subset","(","str",",","optional",")",":","Data","comes","in","English",",","Hindi",",","or","Shuffled","characters",".","Options","are","'en","'",",","'hn","'",",","and","'shuffled","'","for","1000","training","and","test","examples","or","'en-10k","'",",","'hn-10k","'",",","and","'shuffled-10k","'","for","10000","examples",".","Returns",":","tuple",":","training","and","test","files","are","returned"]
code: def load_data(
      self, path=".", task="qa1_single-supporting-fact", subset="en"
  ):
      """
      Fetch the Facebook bAbI dataset and load it to memory.
  
      Arguments:
          path (str, optional): Local directory in which to cache the raw
                                dataset.  Defaults to current directory.
          task (str, optional): bAbI task to load
          subset (str, optional): Data comes in English, Hindi, or Shuffled
                                  characters. Options are 'en', 'hn', and
                                  'shuffled' for 1000 training and test
                                  examples or 'en-10k', 'hn-10k', and
                                  'shuffled-10k' for 10000 examples.
      Returns:
          tuple: training and test files are returned
      """
      workdir, filepath = self._valid_path_append(
          path, "", self.filename
      )
      if not os.path.exists(filepath):
          self.fetch_dataset(
              self.url, self.filename, filepath, self.size
          )
  
      babi_dir_name = self.filename.split(".")[0]
      task = babi_dir_name + "/" + subset + "/" + task + "_{}.txt"
      train_file = os.path.join(workdir, task.format("train"))
      test_file = os.path.join(workdir, task.format("test"))
  
      if os.path.exists(train_file) is False or os.path.exists(
          test_file
      ):
          with tarfile.open(filepath, "r:gz") as f:
              f.extractall(workdir)
  
      return train_file, test_file
  
imports: from builtins import map
  import numpy
  import os
  import re
  import tarfile
  from neon import logger
  from neon.data.dataiterator import NervanaDataIterator
  from neon.data.datasets import Dataset
  from neon.data.text_preprocessing import pad_sentences
  from functools import reduce
label_desc: Use image node_id 2 for calling the BABI obj's underlying member method code with example usage: obj.load_data(path, task, subset) and returns: train_file,  test_file