Package nltk :: Package sem :: Module drt :: Class DrtConcatenation
[hide private]
[frames] | no frames]

type DrtConcatenation

source code

                       object --+            
                                |            
                      AbstractDrs --+        
                                    |        
               object --+           |        
                        |           |        
logic.SubstituteBindingsI --+       |        
                            |       |        
             logic.Expression --+   |        
                                |   |        
           logic.BinaryExpression --+        
                                    |        
                  DrtBinaryExpression --+    
                                        |    
               object --+               |    
                        |               |    
logic.SubstituteBindingsI --+           |    
                            |           |    
             logic.Expression --+       |    
                                |       |    
           logic.BinaryExpression --+   |    
                                    |   |    
              logic.BooleanExpression --+    
                                        |    
                     DrtBooleanExpression --+
                                            |
                                           DrtConcatenation

DRS of the form '(DRS + DRS)'

Instance Methods [hide private]
 
__init__(self, first, second, consequent=None) source code
 
replace(self, variable, expression, replace_bound=False, alpha_convert=True)
Replace all instances of variable v with expression E in self, where v is free in self.
source code
 
eliminate_equality(self) source code
 
simplify(self)
Returns: beta-converted version of this expression
source code
 
get_refs(self, recursive=False)
Return the set of discourse referents in this DRS.
source code
 
getOp(self) source code
 
__eq__(self, other)
Defines equality modulo alphabetic variance.
source code
 
fol(self) source code
 
_pretty(self) source code
 
_pretty_subex(self, subex) source code
 
visit(self, function, combinator, default)
Recursively visit sub expressions
source code
 
__str__(self) source code
 
_str_subex(self, subex) source code

Inherited from AbstractDrs: __add__, __and__, __gt__, __neg__, __or__, applyto, draw, equiv, is_pronoun_function, make_EqualityExpression, make_VariableExpression, pprint, pretty, resolve_anaphora, typecheck

Inherited from AbstractDrs (private): _get_type

Inherited from logic.BooleanExpression (private): _set_type

Inherited from logic.BinaryExpression: findtype, str

Inherited from logic.Expression: __call__, __hash__, __lt__, __neq__, __repr__, free, negate, normalize, substitute_bindings, tp_equals, variables

Static Methods [hide private]

Inherited from DrtBinaryExpression (private): _assemble_pretty

Properties [hide private]

Inherited from AbstractDrs: type

Method Details [hide private]

__init__(self, first, second, consequent=None)
(Constructor)

source code 
Overrides: logic.BinaryExpression.__init__

replace(self, variable, expression, replace_bound=False, alpha_convert=True)

source code 

Replace all instances of variable v with expression E in self, where v is free in self.

Parameters:
  • variable - Variable The variable to replace
  • expression - Expression The expression with which to replace it
  • replace_bound - boolean Should bound variables be replaced?
Overrides: logic.Expression.replace

eliminate_equality(self)

source code 
Overrides: AbstractDrs.eliminate_equality

simplify(self)

source code 
Returns:
beta-converted version of this expression
Overrides: logic.Expression.simplify
(inherited documentation)

get_refs(self, recursive=False)

source code 

Return the set of discourse referents in this DRS.

Parameters:
  • recursive - boolean Also find discourse referents in subterms?
Returns:
list of Variables
Overrides: AbstractDrs.get_refs

See Also: AbstractExpression.get_refs()

__eq__(self, other)
(Equality operator)

source code 

Defines equality modulo alphabetic variance. If we are comparing \x.M and \y.N, then check equality of M and N[x/y].

Overrides: logic.Expression.__eq__

_pretty(self)

source code 
Overrides: DrtBinaryExpression._pretty

_pretty_subex(self, subex)

source code 
Overrides: DrtBinaryExpression._pretty_subex

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: logic.Expression.visit

See Also: Expression.visit()

__str__(self)
(Informal representation operator)

source code 
Overrides: logic.Expression.__str__

_str_subex(self, subex)

source code 
Overrides: logic.BinaryExpression._str_subex