docstr: Args:
      annotators: None or empty set (only tokenizes).
      substitutions: if true, normalizes some token types (e.g. quotes).
docstr_tok: ["Args",":","annotators",":","None","or","empty","set","(","only","tokenizes",")",".","substitutions",":","if","true",",","normalizes","some","token","types","(","e.g",".","quotes",")","."]
code: def __init__(self, **kwargs):
      """
      Args:
          annotators: None or empty set (only tokenizes).
          substitutions: if true, normalizes some token types (e.g. quotes).
      """
      self._regexp = regex.compile(
          "(?P<digit>%s)|(?P<title>%s)|(?P<abbr>%s)|(?P<neg>%s)|(?P<hyph>%s)|"
          "(?P<contr1>%s)|(?P<alphanum>%s)|(?P<contr2>%s)|(?P<sdquote>%s)|"
          "(?P<edquote>%s)|(?P<ssquote>%s)|(?P<esquote>%s)|(?P<dash>%s)|"
          "(?<ellipses>%s)|(?P<punct>%s)|(?P<nonws>%s)"
          % (
              self.DIGIT,
              self.TITLE,
              self.ABBRV,
              self.NEGATION,
              self.HYPHEN,
              self.CONTRACTION1,
              self.ALPHA_NUM,
              self.CONTRACTION2,
              self.START_DQUOTE,
              self.END_DQUOTE,
              self.START_SQUOTE,
              self.END_SQUOTE,
              self.DASH,
              self.ELLIPSES,
              self.PUNCT,
              self.NON_WS,
          ),
          flags=regex.IGNORECASE + regex.UNICODE + regex.MULTILINE,
      )
      if len(kwargs.get("annotators", {})) > 0:
          logger.warning(
              "%s only tokenizes! Skipping annotators: %s"
              % (type(self).__name__, kwargs.get("annotators"))
          )
      self.annotators = set()
      self.substitutions = kwargs.get("substitutions", True)
  
imports: import regex
  from .tokenizer import Tokens, Tokenizer
  from parlai.utils.logging import logger
label_desc: Use image node_id 1 to create a new RegexpTokenizer object from inherited base classes: Tokenizer with example: obj = RegexpTokenizer()