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

type ConstantExpression

source code

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

This class represents variables that do not take the form of a single character followed by zero or more digits.

Instance Methods [hide private]
 
_set_type(self, other_type=?, signature=None)
@see Expression._set_type()
source code
 
free(self, indvar_only=True)
Return a set of all the free (non-bound) variables in self.
source code

Inherited from AbstractVariableExpression: __eq__, __init__, __str__, findtype, replace, simplify, str, visit

Inherited from Expression: __and__, __call__, __gt__, __hash__, __lt__, __neg__, __neq__, __or__, __repr__, applyto, equiv, make_VariableExpression, negate, normalize, substitute_bindings, tp_equals, typecheck, variables

Class Variables [hide private]
  type = e
Method Details [hide private]

_set_type(self, other_type=?, signature=None)

source code 

@see Expression._set_type()

Parameters:
  • other_type - Type to set
  • signature - dict<str, list<AbstractVariableExpression>> store all variable expressions with a given name
Overrides: Expression._set_type

free(self, indvar_only=True)

source code 

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

Parameters:
  • indvar_only - boolean only return individual variables?
Returns:
set of Variables
Overrides: Expression.free

See Also: Expression.free()