Package nltk :: Package sem :: Module logic :: Class Expression
[hide private]
[frames] | no frames]

Class Expression

source code

         object --+    
                  |    
SubstituteBindingsI --+
                      |
                     Expression
Known Subclasses:

This is the base abstract object for all logical expressions

Instance Methods [hide private]
 
__call__(self, other, *additional) source code
 
applyto(self, other) source code
 
__neg__(self) source code
 
negate(self) source code
 
__and__(self, other) source code
 
__or__(self, other) source code
 
__gt__(self, other) source code
 
__lt__(self, other) source code
 
__eq__(self, other) source code
 
tp_equals(self, other, prover_name='tableau')
Pass the expression (self <-> other) to the theorem prover.
source code
 
__hash__(self)
hash(x)
source code
(any)
substitute_bindings(self, bindings)
Returns: The object that is obtained by replacing each variable bound by bindings with its values.
source code
 
__repr__(self)
repr(x)
source code
 
__str__(self)
str(x)
source code
 
variables(self)
Return a set of all the variables that are available to be replaced.
source code
 
free(self, indvar_only=True)
Return a set of all the free (non-bound) variables in self.
source code

Inherited from object: __delattr__, __getattribute__, __init__, __new__, __reduce__, __reduce_ex__, __setattr__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

tp_equals(self, other, prover_name='tableau')

source code 

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

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)

substitute_bindings(self, bindings)

source code 
Returns: (any)
The object that is obtained by replacing each variable bound by bindings with its values. Aliases are already resolved. (maybe?)
Overrides: SubstituteBindingsI.substitute_bindings
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

variables(self)

source code 

Return a set of all the variables that are available to be replaced. This includes free (non-bound) variables as well as predicates.

Returns:
set of Variables
Overrides: SubstituteBindingsI.variables

free(self, indvar_only=True)

source code 

Return a set of all the free (non-bound) variables in self. Variables serving as predicates are no included.

Parameters:
  • indvar_only - boolean only return individual variables?
Returns:
set of Variables