nltk.sem.DrtExpression

class nltk.sem.DrtExpression[source]

Bases: object

This is the base abstract DRT Expression from which every DRT Expression extends.

classmethod fromstring(s)[source]
applyto(other)[source]
equiv(other, prover=None)[source]

Check for logical equivalence. Pass the expression (self <-> other) to the theorem prover. If the prover says it is valid, then the self and other are equal.

Parameters
  • other – an DrtExpression to check equality against

  • prover – a nltk.inference.api.Prover

property type
typecheck(signature=None)[source]
get_refs(recursive=False)[source]

Return the set of discourse referents in this DRS. :param recursive: bool Also find discourse referents in subterms? :return: list of Variable objects

is_pronoun_function()[source]

Is self of the form “PRO(x)”?

make_EqualityExpression(first, second)[source]
make_VariableExpression(variable)[source]
resolve_anaphora()[source]
eliminate_equality()[source]
pretty_format()[source]

Draw the DRS :return: the pretty print string

pretty_print()[source]
draw()[source]