(self, path=".", task='qa1_single-supporting-fact',
                  subset='en')
return train_file, test_file
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
Fetch the Facebook bAbI dataset and load it to memory.
Fetch the Facebook bAbI dataset and load it to memory .
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
def load_data ( self , path = "." , task = 'qa1_single-supporting-fact' , subset = 'en' ) : 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