Word2VecModel¶
-
class
pyspark.mllib.feature.
Word2VecModel
(java_model)[source]¶ class for Word2Vec model
New in version 1.2.0.
Methods
Methods Documentation
-
call
(name, *a)¶ Call method of java_model
-
findSynonyms
(word, num)[source]¶ Find synonyms of a word
- Parameters
word – a word or a vector representation of word
num – number of synonyms to find
- Returns
array of (word, cosineSimilarity)
Note
Local use only
New in version 1.2.0.
-
save
(sc, path)¶ Save this model to the given path.
New in version 1.3.0.
-