Github user flyjy commented on the pull request: https://github.com/apache/spark/pull/11812#issuecomment-201971518 @MLnick This bug has been fixed without changing existing interfaces. Have tested it with your test script with Lee corpus from Gensim. I am not sure whether you need an additional function `getNormalizedVector()` as follows ``` /** * Returns a map of words to their normalized vector representations. */ def getNormalizedVectors: Map[String, Array[Float]] = { wordIndex.map { case (word, ind) => val vec = wordVectors.slice(vectorSize * ind, vectorSize * ind + vectorSize) if(wordVecNorms(ind) != 0.0) { blas.sscal(vectorSize, 1 / wordVecNorms(ind).toFloat, vec, 0, 1) } (word, vec) } } ```
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org