Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/9908#discussion_r49679087
--- Diff: python/pyspark/ml/feature.py ---
@@ -1009,26 +1029,34 @@ class RegexTokenizer(JavaTransformer, HasInputCol,
HasOutputCol):
minTokenLength = Param(Params._dummy(), "minTokenLength", "minimum
token length (>= 0)")
gaps = Param(Params._dummy(), "gaps", "whether regex splits on gaps
(True) or matches tokens")
pattern = Param(Params._dummy(), "pattern", "regex pattern (Java
dialect) used for tokenizing")
+ toLowercase = Param(Params._dummy(), "toLowercase", "whether to
convert all characters to " +
+ "lowercase before tokenizing, default is true")
@keyword_only
- def __init__(self, minTokenLength=1, gaps=True, pattern="\\s+",
inputCol=None, outputCol=None):
+ def __init__(self, minTokenLength=1, gaps=True, pattern="\\s+",
inputCol=None,
+ outputCol=None, toLowercase=True):
"""
- __init__(self, minTokenLength=1, gaps=True, pattern="\\s+",
inputCol=None, outputCol=None)
+ __init__(self, minTokenLength=1, gaps=True, pattern="\\s+",
inputCol=None, \
+ outputCol=None, toLowercase=True)
"""
super(RegexTokenizer, self).__init__()
self._java_obj =
self._new_java_obj("org.apache.spark.ml.feature.RegexTokenizer", self.uid)
self.minTokenLength = Param(self, "minTokenLength", "minimum token
length (>= 0)")
self.gaps = Param(self, "gaps", "whether regex splits on gaps
(True) or matches tokens")
self.pattern = Param(self, "pattern", "regex pattern (Java
dialect) used for tokenizing")
- self._setDefault(minTokenLength=1, gaps=True, pattern="\\s+")
+ self.toLowercase = Param(self, "toLowercase", "whether to convert
all characters to " +
+ "lowercase before tokenizing, default is
true")
--- End diff --
same here (since default is in defaultParamMap)
---
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]