(self, data)
return (s, q, a)
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.
Convert (story, query, answer) word data into vectors.
Convert ( story query answer ) word data into vectors .
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)
def vectorize_stories ( self , data ) : 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 )