nltk.RecursiveDescentParser.__init__

RecursiveDescentParser.__init__(grammar, trace=0)[source]

Create a new RecursiveDescentParser, that uses grammar to parse texts.

Parameters:
  • grammar (CFG) – The grammar used to parse texts.
  • trace (int) – The level of tracing that should be used when parsing a text. 0 will generate no tracing output; and higher numbers will produce more verbose tracing output.