nltk.SteppingShiftReduceParser.step¶
-
SteppingShiftReduceParser.
step
()[source]¶ Perform a single parsing operation. If a reduction is possible, then perform that reduction, and return the production that it is based on. Otherwise, if a shift is possible, then perform it, and return True. Otherwise, return False.
Returns: False if no operation was performed; True if a shift was performed; and the CFG production used to reduce if a reduction was performed. Return type: Production or bool