MCPcopy
hub / github.com/nltk/nltk / get_QuantifiedExpression_factory

Method get_QuantifiedExpression_factory

nltk/sem/logic.py:432–442  ·  view source on GitHub ↗

This method serves as a hook for other logic parsers that have different quantifiers

(self, tok)

Source from the content-addressed store, hash-verified

430 return accum
431
432 def get_QuantifiedExpression_factory(self, tok):
433 """This method serves as a hook for other logic parsers that
434 have different quantifiers"""
435 if tok in Tokens.EXISTS_LIST:
436 return ExistsExpression
437 elif tok in Tokens.ALL_LIST:
438 return AllExpression
439 elif tok in Tokens.IOTA_LIST:
440 return IotaExpression
441 else:
442 self.assertToken(tok, Tokens.QUANTS)
443
444 def make_QuanifiedExpression(self, factory, variable, term):
445 return factory(variable, term)

Callers 1

handle_quantMethod · 0.95

Calls 1

assertTokenMethod · 0.95

Tested by

no test coverage detected