Class: Word2VecModel

eclairjs/mllib/feature. Word2VecModel

Word2Vec model

Constructor

new Word2VecModel()

Source:

Methods

(static) load(sc, path) → {module:eclairjs/mllib/feature.Word2VecModel}

Parameters:
Name Type Description
sc module:eclairjs.SparkContext
path string
Source:
Returns:
Type
module:eclairjs/mllib/feature.Word2VecModel

findSynonyms(wordOrVector, num) → {Array.<module:eclairjs.Tuple2>}

Find synonyms of a word
Parameters:
Name Type Description
wordOrVector string | module:eclairjs/mllib/linald.Vector
num number number of synonyms to find
Source:
Returns:
Type
Array.<module:eclairjs.Tuple2>

getVectors() → {object}

Returns a map of words to their vector representations.
Source:
Returns:
Type
object

save(sc, path)

Parameters:
Name Type Description
sc module:eclairjs.SparkContext
path string
Source:

transform(word) → {module:eclairjs/mllib/linalg.Vector}

Transforms a word to its vector representation
Parameters:
Name Type Description
word string a word
Source:
Returns:
vector representation of word
Type
module:eclairjs/mllib/linalg.Vector