Skip to content

Commit 0c7e552

Browse files
committed
To match Tokenizer and for compatibility with Word2Vec, output a nullable string array type in NGram
1 parent e48ebc4 commit 0c7e552

File tree

1 file changed

+1
-1
lines changed
  • mllib/src/main/scala/org/apache/spark/ml/feature

1 file changed

+1
-1
lines changed

mllib/src/main/scala/org/apache/spark/ml/feature/NGram.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class NGram @Since("1.5.0") (@Since("1.5.0") override val uid: String)
6868
s"Input type must be ArrayType(StringType) but got $inputType.")
6969
}
7070

71-
override protected def outputDataType: DataType = new ArrayType(StringType, false)
71+
override protected def outputDataType: DataType = new ArrayType(StringType, true)
7272
}
7373

7474
@Since("1.6.0")

0 commit comments

Comments
 (0)