zhengruifeng commented on code in PR #49624: URL: https://github.com/apache/spark/pull/49624#discussion_r1926867921
########## python/pyspark/ml/feature.py: ########## @@ -5072,7 +5073,7 @@ def __init__( self._setDefault( stopWords=StopWordsRemover.loadDefaultStopWords("english"), caseSensitive=False, - locale=self._java_obj.getLocale(), + locale="en_US" if isinstance(self._java_obj, str) else self._java_obj.getLocale(), Review Comment: let me rethink here, if we skip _setDefault locale, then `remover.getLocale()` fails if user does not explicitly set it, but it will reuse the default value in the jvm side. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org