Python, NLP, Numpy, Scikit Learn.
word_vector(self, tokens): vec = np.array([]) for token in tokens: if token in self.vocab: if token in self.vector_lookup: print(f'Add {token}') vec = np.append(self.vector_lookup[token], vec) return vec Here is an example output. encoder = Word2VecEncoder(corpus.vocab()) sent1 = [word for word in