Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/17234#discussion_r105351821 --- Diff: mllib/src/main/scala/org/apache/spark/mllib/feature/Word2Vec.scala --- @@ -610,6 +610,71 @@ class Word2VecModel private[spark] ( } /** + * Find words similar to the words supplied to 'positive' and dissimilar + * to the words supplied to 'negative'. + * @param positive array of words similar to the results list + * @param negative array of words dissimilar to the results list + * @param num number of synonyms to find + * @return array of (word, cosineSimilarity) + */ + def findAnalogies(positive: Array[String] = Array(), + negative: Array[String] = Array(), --- End diff -- Nit: indentation.
--- 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