RegexpParser.__init__(grammar, root_label=u'S', loop=1, trace=0)[source]

Create a new chunk parser, from the given start state and set of chunk patterns.

  • grammar (str or list(RegexpChunkParser)) – The grammar, or a list of RegexpChunkParser objects
  • root_label (str or Nonterminal) – The top node of the tree being created
  • loop (int) – The number of times to run through the patterns
  • trace (int) – The level of tracing that should be used when parsing a text. 0 will generate no tracing output; 1 will generate normal tracing output; and 2 or higher will generate verbose tracing output.