'Convert a list of texts to a Numpy matrix.
# Arguments
texts: list of strings.
mode: one of "binary", "count", "tfidf", "freq".
# Returns
A Numpy matrix.'

def texts_to_matrix(self, texts, mode='binary'):

    sequences = self.texts_to_sequences(texts)
    return self.sequences_to_matrix(sequences, mode=mode)
