Methods
(static) load(sc, path) → {module:eclairjs/mllib/feature.Word2VecModel}
Parameters:
Name | Type | Description |
---|---|---|
sc |
module:eclairjs.SparkContext | |
path |
string |
Returns:
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 |
Returns:
- Type
- Array.<module:eclairjs.Tuple2>
getVectors() → {object}
Returns a map of words to their vector representations.
Returns:
- Type
- object
save(sc, path)
Parameters:
Name | Type | Description |
---|---|---|
sc |
module:eclairjs.SparkContext | |
path |
string |
transform(word) → {module:eclairjs/mllib/linalg.Vector}
Transforms a word to its vector representation
Parameters:
Name | Type | Description |
---|---|---|
word |
string | a word |
Returns:
vector representation of word