class_docstr: A tokenizer that splits text by a regex pattern.
  
  The pattern needs to be set with :meth:`.setPattern` and this sets the
  delimiting pattern or how the tokens should be split. By default this
  pattern is ``\s+`` which means that tokens should be split by 1 or more
  whitespace characters.
  
  ====================== ======================
  Input Annotation types Output Annotation type
  ====================== ======================
  ``DOCUMENT``           ``TOKEN``
  ====================== ======================
  
  Parameters
  ----------
  minLength
      Set the minimum allowed length for each token, by default 1
  maxLength
      Set the maximum allowed length for each token
  toLowercase
      Indicates whether to convert all characters to lowercase before
      tokenizing, by default False
  pattern
      Regex pattern used for tokenizing, by default ``\s+``
  positionalMask
      Using a positional mask to guarantee the incremental progression of the
      tokenization, by default False
  trimWhitespace
      Using a trimWhitespace flag to remove whitespaces from identified tokens,
      by default False
  preservePosition
      Using a preservePosition flag to preserve initial indexes before eventual whitespaces removal in tokens,
      by default True
  
  Examples
  --------
  >>> import sparknlp
  >>> from sparknlp.base import *
  >>> from sparknlp.annotator import *
  >>> from pyspark.ml import Pipeline
  >>> documentAssembler = DocumentAssembler() \
  ...     .setInputCol("text") \
  ...     .setOutputCol("document")
  >>> regexTokenizer = RegexTokenizer() \
  ...     .setInputCols(["document"]) \
  ...     .setOutputCol("regexToken") \
  ...     .setToLowercase(True) \
  >>> pipeline = Pipeline().setStages([
  ...       documentAssembler,
  ...       regexTokenizer
  ...     ])
  >>> data = spark.createDataFrame([["This is my first sentence.\nThis is my second."]]).toDF("text")
  >>> result = pipeline.fit(data).transform(data)
  >>> result.selectExpr("regexToken.result").show(truncate=False)
  +-------------------------------------------------------+
  |result                                                 |
  +-------------------------------------------------------+
  |[this, is, my, first, sentence., this, is, my, second.]|
  +-------------------------------------------------------+
class_docstr_tok: ["A","tokenizer","that","splits","text","by","a","regex","pattern",".","The","pattern","needs","to","be","set","with",":","meth",":","`",".setPattern","`","and","this","sets","the","delimiting","pattern","or","how","the","tokens","should","be","split",".","By","default","this","pattern","is","``","\\s+","``","which","means","that","tokens","should","be","split","by","1","or","more","whitespace","characters",".","======================","======================","Input","Annotation","types","Output","Annotation","type","======================","======================","``","DOCUMENT","``","``","TOKEN","``","======================","======================","Parameters","--","--","--","--","--","minLength","Set","the","minimum","allowed","length","for","each","token",",","by","default","1","maxLength","Set","the","maximum","allowed","length","for","each","token","toLowercase","Indicates","whether","to","convert","all","characters","to","lowercase","before","tokenizing",",","by","default","False","pattern","Regex","pattern","used","for","tokenizing",",","by","default","``","\\s+","``","positionalMask","Using","a","positional","mask","to","guarantee","the","incremental","progression","of","the","tokenization",",","by","default","False","trimWhitespace","Using","a","trimWhitespace","flag","to","remove","whitespaces","from","identified","tokens",",","by","default","False","preservePosition","Using","a","preservePosition","flag","to","preserve","initial","indexes","before","eventual","whitespaces","removal","in","tokens",",","by","default","True","Examples","--","--","--","--",">",">",">","import","sparknlp",">",">",">","from","sparknlp.base","import","*",">",">",">","from","sparknlp.annotator","import","*",">",">",">","from","pyspark.ml","import","Pipeline",">",">",">","documentAssembler","=","DocumentAssembler","(",")","\\","...",".setInputCol","(","``","text","''",")","\\","...",".setOutputCol","(","``","document","''",")",">",">",">","regexTokenizer","=","RegexTokenizer","(",")","\\","...",".setInputCols","(","[","``","document","''","]",")","\\","...",".setOutputCol","(","``","regexToken","''",")","\\","...",".setToLowercase","(","True",")","\\",">",">",">","pipeline","=","Pipeline","(",")",".setStages","(","[","...","documentAssembler",",","...","regexTokenizer","...","]",")",">",">",">","data","=","spark.createDataFrame","(","[","[","``","This","is","my","first","sentence.\\nThis","is","my","second",".","``","]","]",")",".toDF","(","``","text","''",")",">",">",">","result","=","pipeline.fit","(","data",")",".transform","(","data",")",">",">",">","result.selectExpr","(","``","regexToken.result","''",")",".show","(","truncate=False",")","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|result","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","[","this",",","is",",","my",",","first",",","sentence.",",","this",",","is",",","my",",","second",".","]","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+"]
docstr: Sets whether to use a positional mask to guarantee the incremental
  progression of the tokenization, by default False.
  
  Parameters
  ----------
  value : bool
      Whether to use a positional mask
docstr_tok: ["Sets","whether","to","use","a","positional","mask","to","guarantee","the","incremental","progression","of","the","tokenization",",","by","default","False",".","Parameters","--","--","--","--","--","value",":","bool","Whether","to","use","a","positional","mask"]
code: def setPositionalMask(self, value):
      """Sets whether to use a positional mask to guarantee the incremental
      progression of the tokenization, by default False.
  
      Parameters
      ----------
      value : bool
          Whether to use a positional mask
      """
      return self._set(positionalMask=value)
  
file_path: spark-nlp/python/sparknlp/annotator/token/regex_tokenizer.py
imports: from sparknlp.common import *
label_desc: Use image node_id 6 for calling the RegexTokenizer obj's underlying member method code with example usage: obj.setPositionalMask(value) and returns: self