class_docstr: A regular expression based chunk parser.  ``RegexpChunkParser`` uses a
  sequence of "rules" to find chunks of a single type within a
  text.  The chunking of the text is encoded using a ``ChunkString``,
  and each rule acts by modifying the chunking in the
  ``ChunkString``.  The rules are all implemented using regular
  expression matching and substitution.
  
  The ``RegexpChunkRule`` class and its subclasses (``ChunkRule``,
  ``StripRule``, ``UnChunkRule``, ``MergeRule``, and ``SplitRule``)
  define the rules that are used by ``RegexpChunkParser``.  Each rule
  defines an ``apply()`` method, which modifies the chunking encoded
  by a given ``ChunkString``.
  
  :type _rules: list(RegexpChunkRule)
  :ivar _rules: The list of rules that should be applied to a text.
  :type _trace: int
  :ivar _trace: The default level of tracing.
class_docstr_tok: ["A","regular","expression","based","chunk","parser",".","``","RegexpChunkParser","``","uses","a","sequence","of","``","rules","''","to","find","chunks","of","a","single","type","within","a","text",".","The","chunking","of","the","text","is","encoded","using","a","``","ChunkString","``",",","and","each","rule","acts","by","modifying","the","chunking","in","the","``","ChunkString","``",".","The","rules","are","all","implemented","using","regular","expression","matching","and","substitution",".","The","``","RegexpChunkRule","``","class","and","its","subclasses","(","``","ChunkRule","``",",","``","StripRule","``",",","``","UnChunkRule","``",",","``","MergeRule","``",",","and","``","SplitRule","``",")","define","the","rules","that","are","used","by","``","RegexpChunkParser","``",".","Each","rule","defines","an","``","apply","(",")","``","method",",","which","modifies","the","chunking","encoded","by","a","given","``","ChunkString","``",".",":","type","_rules",":","list","(","RegexpChunkRule",")",":","ivar","_rules",":","The","list","of","rules","that","should","be","applied","to","a","text",".",":","type","_trace",":","int",":","ivar","_trace",":","The","default","level","of","tracing","."]
docstr: Apply each rule of this ``RegexpChunkParser`` to ``chunkstr``, in
  turn.  Generate trace output between each rule.  If ``verbose``
  is true, then generate verbose output.
  
  :type chunkstr: ChunkString
  :param chunkstr: The chunk string to which each rule should be
      applied.
  :type verbose: bool
  :param verbose: Whether output should be verbose.
  :rtype: None
docstr_tok: ["Apply","each","rule","of","this","``","RegexpChunkParser","``","to","``","chunkstr","``",",","in","turn",".","Generate","trace","output","between","each","rule",".","If","``","verbose","``","is","true",",","then","generate","verbose","output",".",":","type","chunkstr",":","ChunkString",":","param","chunkstr",":","The","chunk","string","to","which","each","rule","should","be","applied",".",":","type","verbose",":","bool",":","param","verbose",":","Whether","output","should","be","verbose",".",":","rtype",":","None"]
code: def _trace_apply(self, chunkstr, verbose):
      """
      Apply each rule of this ``RegexpChunkParser`` to ``chunkstr``, in
      turn.  Generate trace output between each rule.  If ``verbose``
      is true, then generate verbose output.
  
      :type chunkstr: ChunkString
      :param chunkstr: The chunk string to which each rule should be
          applied.
      :type verbose: bool
      :param verbose: Whether output should be verbose.
      :rtype: None
      """
      print("# Input:")
      print(chunkstr)
      for rule in self._rules:
          rule.apply(chunkstr)
          if verbose:
              print("#", rule.descr() + " (" + repr(rule) + "):")
          else:
              print("#", rule.descr() + ":")
          print(chunkstr)
  
imports: import re
  import regex
  from nltk.chunk.api import ChunkParserI
  from nltk.tree import Tree
label_desc: Use image node_id 2 for calling the RegexpChunkParser obj's underlying member method code with example usage: obj._trace_apply(chunkstr, verbose) without return types