nltk.ShiftReduceParser.__init__¶
-
ShiftReduceParser.
__init__
(grammar, trace=0)[source]¶ Create a new
ShiftReduceParser
, that usesgrammar
to parse texts.Parameters: - grammar (Grammar) – 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.