word2vec.WordVectors.__init__

WordVectors.__init__(vocab, vectors, clusters=None)[source]

Initialize a WordVectors class based on vocabulary and vectors

This initializer precomputes the vectors of the vectors

Parameters:

vocab : np.array

1d array with the vocabulary

vectors : np.array

2d array with the vectors calculated by word2vec

clusters : word2vec.WordClusters (optional)

1d array with the clusters calculated by word2vec