diff options
author | Xiangrui Meng <meng@databricks.com> | 2015-08-12 17:06:12 -0700 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-08-12 17:06:12 -0700 |
commit | fc1c7fd66e64ccea53b31cd2fbb98bc6d307329c (patch) | |
tree | 98dee329fe517bdeb0adfe61753d313f019498ea /mllib | |
parent | e6aef55766d0e2a48e0f9cb6eda0e31a71b962f3 (diff) | |
download | spark-fc1c7fd66e64ccea53b31cd2fbb98bc6d307329c.tar.gz spark-fc1c7fd66e64ccea53b31cd2fbb98bc6d307329c.tar.bz2 spark-fc1c7fd66e64ccea53b31cd2fbb98bc6d307329c.zip |
[SPARK-9915] [ML] stopWords should use StringArrayParam
hhbyyh
Author: Xiangrui Meng <meng@databricks.com>
Closes #8141 from mengxr/SPARK-9915.
Diffstat (limited to 'mllib')
-rw-r--r-- | mllib/src/main/scala/org/apache/spark/ml/feature/StopWordsRemover.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/ml/feature/StopWordsRemover.scala b/mllib/src/main/scala/org/apache/spark/ml/feature/StopWordsRemover.scala index 3cc4142446..5d77ea08db 100644 --- a/mllib/src/main/scala/org/apache/spark/ml/feature/StopWordsRemover.scala +++ b/mllib/src/main/scala/org/apache/spark/ml/feature/StopWordsRemover.scala @@ -19,12 +19,12 @@ package org.apache.spark.ml.feature import org.apache.spark.annotation.Experimental import org.apache.spark.ml.Transformer +import org.apache.spark.ml.param.{BooleanParam, ParamMap, StringArrayParam} import org.apache.spark.ml.param.shared.{HasInputCol, HasOutputCol} -import org.apache.spark.ml.param.{ParamMap, BooleanParam, Param} import org.apache.spark.ml.util.Identifiable import org.apache.spark.sql.DataFrame -import org.apache.spark.sql.types.{StringType, StructField, ArrayType, StructType} import org.apache.spark.sql.functions.{col, udf} +import org.apache.spark.sql.types.{ArrayType, StringType, StructField, StructType} /** * stop words list @@ -100,7 +100,7 @@ class StopWordsRemover(override val uid: String) * the stop words set to be filtered out * @group param */ - val stopWords: Param[Array[String]] = new Param(this, "stopWords", "stop words") + val stopWords: StringArrayParam = new StringArrayParam(this, "stopWords", "stop words") /** @group setParam */ def setStopWords(value: Array[String]): this.type = set(stopWords, value) |