nltk.BottomUpProbabilisticChartParser.__init__

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

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

Parameters:
  • grammar (PCFG) – The grammar used to parse texts.
  • beam_size (int) – The maximum length for the parser’s edge queue.
  • 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.