word2vec.WordVectors

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

Methods

__init__(vocab, vectors[, clusters]) Initialize a WordVectors class based on vocabulary and vectors
analogy(pos, neg[, n]) Analogy similarity.
cosine(word[, n]) Cosine similarity.
from_binary(fname[, vocabUnicodeSize, ...]) Create a WordVectors class based on a word2vec binary file
from_mmap(fname) Create a WordVectors class from a memory map
from_text(fname[, vocabUnicodeSize, ...]) Create a WordVectors class based on a word2vec text file
generate_response(indexes, metrics[, clusters]) Generates a pure python (no numpy) response based on numpy arrays
get_vector(word) Returns the (vectors) vector for word in the vocabulary
ix(word) Returns the index on self.vocab and self.vectors for word
to_mmap(fname)