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: Convert (story, query, answer) word data into vectors.
  
  Arguments:
      data (tuple) : Tuple of story, query, answer word data.
  
  Returns:
      tuple : Tuple of story, query, answer vectors.
docstr_tok: ["Convert","(","story",",","query",",","answer",")","word","data","into","vectors",".","Arguments",":","data","(","tuple",")",":","Tuple","of","story",",","query",",","answer","word","data",".","Returns",":","tuple",":","Tuple","of","story",",","query",",","answer","vectors","."]
code: def vectorize_stories(self, data):
      """
      Convert (story, query, answer) word data into vectors.
  
      Arguments:
          data (tuple) : Tuple of story, query, answer word data.
  
      Returns:
          tuple : Tuple of story, query, answer vectors.
      """
      s, q, a = [], [], []
      for story, query, answer in data:
          s.append(self.words_to_vector(story))
          q.append(self.words_to_vector(query))
          a.append(self.one_hot_vector(answer))
  
      s = pad_sentences(s, self.story_maxlen)
      q = pad_sentences(q, self.query_maxlen)
      a = np.array(a)
      return (s, q, a)
  
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 9 for calling the BABI obj's underlying member method code with example usage: obj.vectorize_stories(data) and returns: s,  q,  a