zhengruifeng opened a new pull request, #58811: URL: https://github.com/apache/spark/pull/58811
### What changes were proposed in this pull request? This PR changes `org.apache.spark.ml.feature.Word2VecModel` to store its word index and flattened word vectors directly instead of wrapping an `org.apache.spark.mllib.feature.Word2VecModel`. It also moves the synonym-search implementation used by the ML model into the `Word2VecModel` companion object and updates model fitting, copying, size estimation, transformation, and persistence to use the directly stored data. ### Why are the changes needed? The ML model only needs the word index and vector array from the legacy MLlib model. Storing those values directly removes the unnecessary model wrapper and keeps the ML model's implementation and synonym-search logic self-contained. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Testing is pending. This draft PR was opened before running tests. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Codex (GPT-5) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
