Github user holdenk commented on a diff in the pull request:
https://github.com/apache/spark/pull/11939#discussion_r58238526
--- Diff: python/pyspark/ml/feature.py ---
@@ -1721,7 +1721,7 @@ def __init__(self, inputCol=None, outputCol=None,
stopWords=None,
self._java_obj =
self._new_java_obj("org.apache.spark.ml.feature.StopWordsRemover",
self.uid)
stopWordsObj = _jvm().org.apache.spark.ml.feature.StopWords
- defaultStopWords = stopWordsObj.English()
+ defaultStopWords = list(stopWordsObj.English())
--- End diff --
I don't think we ever explicitly access them on the Python side - although
a users application might attempt to do that and append stop words to the
existing list in which case having it as a list is maybe good. One could get a
similar effect by changing getStopWords without having to round trip the list
in cases where it isn't ever accessed on the python side.
---
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]