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

type BinaryExpression

source code

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

Instance Methods [hide private]
 
__init__(self, first, second) source code
 
findtype(self, variable)
@see Expression.findtype()
source code
 
visit(self, function, combinator, default)
Recursively visit sub expressions
source code
 
__eq__(self, other) source code
 
__str__(self) source code
 
_str_subex(self, subex) source code
 
str(self, syntax=Tokens.NLTK)

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

Inherited from Expression (private): _set_type

Properties [hide private]
  type
Method Details [hide private]

__init__(self, first, second)
(Constructor)

source code 
Overrides: object.__init__
(inherited documentation)

findtype(self, variable)

source code 

@see Expression.findtype()

Parameters:
  • variable - Variable
Overrides: Expression.findtype

visit(self, function, combinator, default)

source code 

Recursively visit sub expressions

Parameters:
  • function - Function to call on each sub expression
  • combinator - Function to combine the results of the function calls
Returns:
result of combination
Overrides: Expression.visit

See Also: Expression.visit()

__eq__(self, other)
(Equality operator)

source code 
Overrides: Expression.__eq__

__str__(self)
(Informal representation operator)

source code 
Overrides: Expression.__str__

Property Details [hide private]

type