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
99
1010## Word2Vec
1111
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
1313representations is that similar words are close in the vector space, which makes generalization to
1414novel patterns easier and model estimation more robust. Distributed vector representation is
1515showed to be useful in many natural language processing applications such as named entity
@@ -64,7 +64,7 @@ val model = word2vec.fit(input)
6464val synonyms = model.findSynonyms("china", 40)
6565
6666for((synonym, cosineSimilarity) <- synonyms) {
67- println(synonym + " " + cosineSimilarity.toString )
67+ println(s"$ synonym $ cosineSimilarity" )
6868}
6969{% endhighlight %}
7070</div >
You can’t perform that action at this time.
0 commit comments