Skip to content

Commit 4ff11d4

Browse files
committed
minor fix
1 parent 8d7458f commit 4ff11d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/mllib-feature-extraction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
1313
representations is that similar words are close in the vector space, which makes generalization to
1414
novel patterns easier and model estimation more robust. Distributed vector representation is
1515
showed to be useful in many natural language processing applications such as named entity
@@ -64,7 +64,7 @@ val model = word2vec.fit(input)
6464
val synonyms = model.findSynonyms("china", 40)
6565

6666
for((synonym, cosineSimilarity) <- synonyms) {
67-
println(synonym + " " + cosineSimilarity.toString)
67+
println(s"$synonym $cosineSimilarity")
6868
}
6969
{% endhighlight %}
7070
</div>

0 commit comments

Comments
 (0)