Github user MLnick commented on a diff in the pull request:
https://github.com/apache/spark/pull/10152#discussion_r47429145
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/feature/Word2Vec.scala ---
@@ -264,7 +276,8 @@ class Word2Vec extends Serializable with Logging {
/**
* Computes the vector representation of each word in vocabulary.
- * @param dataset an RDD of words
+ * @param dataset a RDD of sentences,
+ * each sentence is expressed as an iterable collection
of words
--- End diff --
I think we should remove L286 and change `learnVocab` to
`learnVocab(dataset)`. The `val words = dataset.flatMap(x => x)` can the be
moved into `learnVocab`. This seems clearer to me, to avoid confusion, since
`words` is no longer used apart from the learn vocab step.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]