public class Word2VecModel
extends Object
implements scala.Serializable
Modifier and Type | Method and Description |
---|---|
scala.Tuple2<String,Object>[] |
findSynonyms(String word,
int num)
Find synonyms of a word
|
scala.Tuple2<String,Object>[] |
findSynonyms(Vector vector,
int num)
Find synonyms of the vector representation of a word
|
Vector |
transform(String word)
Transforms a word to its vector representation
|
public Vector transform(String word)
word
- a wordpublic scala.Tuple2<String,Object>[] findSynonyms(String word, int num)
word
- a wordnum
- number of synonyms to findpublic scala.Tuple2<String,Object>[] findSynonyms(Vector vector, int num)
vector
- vector representation of a wordnum
- number of synonyms to find