MCPcopy
hub / github.com/nltk/nltk / assertToken

Method assertToken

nltk/sem/logic.py:575–581  ·  view source on GitHub ↗
(self, tok, expected)

Source from the content-addressed store, hash-verified

573 raise UnexpectedTokenException(self._currentIndex, tok, expected)
574
575 def assertToken(self, tok, expected):
576 if isinstance(expected, list):
577 if tok not in expected:
578 raise UnexpectedTokenException(self._currentIndex, tok, expected)
579 else:
580 if tok != expected:
581 raise UnexpectedTokenException(self._currentIndex, tok, expected)
582
583 def __repr__(self):
584 if self.inRange(0):

Callers 15

_handle_notMethod · 0.80
_handle_predMethod · 0.80
_handle_duplexMethod · 0.80
_handle_namedMethod · 0.80
_handle_relMethod · 0.80
_handle_timexMethod · 0.80
_handle_dateMethod · 0.80
_handle_timeMethod · 0.80
_handle_cardMethod · 0.80
_handle_propMethod · 0.80

Calls 1

Tested by

no test coverage detected