File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ displayTitle: <a href="mllib-guide.html">MLlib</a> - Feature Extraction
9
9
10
10
## Word2Vec
11
11
12
- Wor2Vec computes distributed vector representation of words. The main advantage of the distributed
12
+ Word2Vec computes distributed vector representation of words. The main advantage of the distributed
13
13
representations is that similar words are close in the vector space, which makes generalization to
14
14
novel patterns easier and model estimation more robust. Distributed vector representation is
15
15
showed to be useful in many natural language processing applications such as named entity
@@ -64,7 +64,7 @@ val model = word2vec.fit(input)
64
64
val synonyms = model.findSynonyms("china", 40)
65
65
66
66
for((synonym, cosineSimilarity) <- synonyms) {
67
- println(synonym + " " + cosineSimilarity.toString )
67
+ println(s"$ synonym $ cosineSimilarity" )
68
68
}
69
69
{% endhighlight %}
70
70
</div >
You can’t perform that action at this time.
0 commit comments