MCPcopy
hub / github.com/nltk/nltk / _match

Method _match

nltk/app/rdparser_app.py:667–680  ·  view source on GitHub ↗
(self, *e)

Source from the content-addressed store, hash-verified

665 return False
666
667 def _match(self, *e):
668 if self._animating_lock:
669 return
670 old_frontier = self._parser.frontier()
671 rv = self._parser.match()
672 if rv is not None:
673 self._lastoper1["text"] = "Match:"
674 self._lastoper2["text"] = rv
675 self._animate_match(old_frontier[0])
676 return True
677 else:
678 self._lastoper1["text"] = "Match:"
679 self._lastoper2["text"] = "(failed)"
680 return False
681
682 def _backtrack(self, *e):
683 if self._animating_lock:

Callers 2

matchMethod · 0.95
_stepMethod · 0.95

Calls 3

_animate_matchMethod · 0.95
frontierMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected