__init__(self,
grammar,
strategy=[LeafInitRule(), FeatureEmptyPredictRule(), FeatureBottomUpPre...,
trace_chart_width=20,
chart_class=<class 'nltk.parse.featurechart.FeatureChart'>,
**parser_args)
(Constructor)
| source code
|
Create a new chart parser, that uses grammar to parse
texts.
- Parameters:
grammar - The grammar used to parse texts.
strategy - A list of rules that should be used to decide what edges to add
to the chart (top-down strategy by default).
trace - 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.
trace_chart_width - The default total width reserved for the chart in trace output.
The remainder of each line will be used to display edges.
use_agenda - Use an optimized agenda-based algorithm, if possible.
chart_class - The class that should be used to create the parse charts.
- Overrides:
chart.ChartParser.__init__
- (inherited documentation)
|