-
- Downloads
[SPARK-17629][ML] methods to return synonyms directly
## What changes were proposed in this pull request? provide methods to return synonyms directly, without wrapping them in a dataframe In performance sensitive applications (such as user facing apis) the roundtrip to and from dataframes is costly and unnecessary The methods are named ``findSynonymsArray`` to make the return type clear, which also implies a local datastructure ## How was this patch tested? updated word2vec tests Author: Asher Krim <akrim@hubspot.com> Closes #16811 from Krimit/w2vFindSynonymsLocal.
Showing
- mllib/src/main/scala/org/apache/spark/ml/feature/Word2Vec.scala 31 additions, 6 deletions...src/main/scala/org/apache/spark/ml/feature/Word2Vec.scala
- mllib/src/test/scala/org/apache/spark/ml/feature/Word2VecSuite.scala 14 additions, 6 deletions...est/scala/org/apache/spark/ml/feature/Word2VecSuite.scala
Loading
Please register or sign in to comment