nltk.parse.SteppingShiftReduceParser.set_grammar

SteppingShiftReduceParser.set_grammar(grammar)[source]

Change the grammar used to parse texts.

Parameters:grammar (CFG) – The new grammar.