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

    https://github.com/apache/spark/pull/17451#discussion_r108359474
  
    --- Diff: python/pyspark/ml/feature.py ---
    @@ -2674,6 +2674,18 @@ def findSynonyms(self, word, num):
                 word = _convert_to_vector(word)
             return self._call_java("findSynonyms", word, num)
     
    +    @since("2.2.0")
    +    def findSynonymsArray(self, wordVector, num):
    +        """
    +        Find "num" number of words closest in similarity to "word".
    +        word can be a string or vector representation.
    +        Returns a dataframe with two fields word and similarity (which
    +        gives the cosine similarity).
    +        """
    +        # if not isinstance(wordVector, basestring):
    --- End diff --
    
    Why is this commented out? There are two versions of `findSynonymsArray` on 
the Scala side just like there are for `findSynonyms` - we need it to work for 
both a string and vector input.


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

Reply via email to