class_docstr: A tokenizer that divides strings into s-expressions.
  An s-expresion can be either:
  
    - a parenthesized expression, including any nested parenthesized
      expressions, or
    - a sequence of non-whitespace non-parenthesis characters.
  
  For example, the string ``(a (b c)) d e (f)`` consists of four
  s-expressions: ``(a (b c))``, ``d``, ``e``, and ``(f)``.
  
  By default, the characters ``(`` and ``)`` are treated as open and
  close parentheses, but alternative strings may be specified.
  
  :param parens: A two-element sequence specifying the open and close parentheses
      that should be used to find sexprs.  This will typically be either a
      two-character string, or a list of two strings.
  :type parens: str or list
  :param strict: If true, then raise an exception when tokenizing an ill-formed sexpr.
class_docstr_tok: ["A","tokenizer","that","divides","strings","into","s-expressions",".","An","s-expresion","can","be","either",":","-","a","parenthesized","expression",",","including","any","nested","parenthesized","expressions",",","or","-","a","sequence","of","non-whitespace","non-parenthesis","characters",".","For","example",",","the","string","``","(","a","(","b","c",")",")","d","e","(","f",")","``","consists","of","four","s-expressions",":","``","(","a","(","b","c",")",")","``",",","``","d","``",",","``","e","``",",","and","``","(","f",")","``",".","By","default",",","the","characters","``","(","``","and","``",")","``","are","treated","as","open","and","close","parentheses",",","but","alternative","strings","may","be","specified",".",":","param","parens",":","A","two-element","sequence","specifying","the","open","and","close","parentheses","that","should","be","used","to","find","sexprs",".","This","will","typically","be","either","a","two-character","string",",","or","a","list","of","two","strings",".",":","type","parens",":","str","or","list",":","param","strict",":","If","true",",","then","raise","an","exception","when","tokenizing","an","ill-formed","sexpr","."]
code: def __init__(self, parens="()", strict=True):
      if len(parens) != 2:
          raise ValueError("parens must contain exactly two strings")
      self._strict = strict
      self._open_paren = parens[0]
      self._close_paren = parens[1]
      self._paren_regexp = re.compile(
          f"{re.escape(parens[0])}|{re.escape(parens[1])}"
      )
  
imports: import re
  from nltk.tokenize.api import TokenizerI
label_desc: Use image node_id 1 to create a new SExprTokenizer object from inherited base classes: TokenizerI with example: obj = SExprTokenizer(parens, strict)