Github user MechCoder commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5748#discussion_r35440919
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/feature/Word2Vec.scala ---
    @@ -484,8 +480,9 @@ class Word2VecModel private[spark] (
        * @return vector representation of word
        */
       def transform(word: String): Vector = {
    -    model.get(word) match {
    -      case Some(vec) =>
    +    wordIndex.get(word) match {
    +      case Some(ind) =>
    +        val vec = wordVectors.slice(ind * vectorSize, ind * vectorSize + 
vectorSize)
    --- End diff --
    
    It gives me a compilation error, so that also works in favor of not 
changing it :p 


---
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]

Reply via email to