Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/10152#discussion_r46768439
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/feature/Word2Vec.scala ---
@@ -555,6 +614,14 @@ class Word2VecModel private[spark] (
(word, wordVectors.slice(vectorSize * ind, vectorSize * ind +
vectorSize))
}
}
+
+ /**
+ * get word vector array. length is vocabularySize*vectorSize
+ * @return the array of word vectors, need to split it by vectorSize to
get each individual vector
+ */
+ def getWordVectors: Array[Float] = {
--- End diff --
Yes, let's remove other changes that are not related to this issue. I don't
think this class should expose its internal data structures and utility
functions "just because". Just the sentence length change should be here
---
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]