Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11871#discussion_r56936977
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/feature/StopWordsRemover.scala ---
    @@ -98,13 +67,16 @@ class StopWordsRemover(override val uid: String)
     
       /**
        * the stop words set to be filtered out
    -   * Default: [[StopWords.English]]
    +   * Default: [[StopWords.languageMap("english")]]
        * @group param
        */
       val stopWords: StringArrayParam = new StringArrayParam(this, 
"stopWords", "stop words")
     
       /** @group setParam */
    -  def setStopWords(value: Array[String]): this.type = set(stopWords, value)
    +  def setStopWords(value: Array[String]): this.type = {
    +    set(stopWords, value)
    +    set(language, "unknown")
    --- End diff --
    
    We shouldn't set other parameters in the setters since their are other ways 
to overwrite param values. Let's keep the default language to `english` and if 
`stopWords` is set, ignore the language setting. This logic should happen in 
`transform`.


---
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]

Reply via email to