class nltk.sem.Model(domain, valuation)[source]

A first order model is a domain D of discourse and a valuation V.

A domain D is a set, and a valuation V is a map that associates expressions with values in the model. The domain of V should be a subset of D.

Construct a new Model.

  • domain (set) – A set of entities representing the domain of discourse of the model.
  • valuation (Valuation) – the valuation of the model.
  • prop – If this is set, then we are building a propositional model and don’t require the domain of V to be subset of D.


__init__(domain, valuation)
evaluate(expr, g[, trace]) Read input expressions, and provide a handler for satisfy that blocks further propagation of the Undefined error.
i(parsed, g[, trace]) An interpretation function.
satisfiers(parsed, varex, g[, trace, nesting]) Generate the entities from the model’s domain that satisfy an open formula.
satisfy(parsed, g[, trace]) Recursive interpretation function for a formula of first-order logic.