pyspark.mllib.feature.
Word2VecModel
class for Word2Vec model
Methods
call(name, *a)
call
Call method of java_model
findSynonyms(word, num)
findSynonyms
Find synonyms of a word
getVectors()
getVectors
Returns a map of words to their vector representations.
load(sc, path)
load
Load a model from the given path.
save(sc, path)
save
Save this model to the given path.
transform(word)
transform
Transforms a word to its vector representation
Methods Documentation
New in version 1.2.0.
pyspark.mllib.linalg.Vector
a word or a vector representation of word
number of synonyms to find
collections.abc.Iterable
array of (word, cosineSimilarity)
Notes
Local use only
New in version 1.4.0.
New in version 1.5.0.
New in version 1.3.0.
a word
vector representation of word(s)