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

type DrtProposition

source code

                   object --+    
                            |    
                  AbstractDrs --+
                                |
               object --+       |
                        |       |
logic.SubstituteBindingsI --+   |
                            |   |
             logic.Expression --+
                                |
                               DrtProposition

Instance Methods [hide private]
 
__init__(self, variable, drs) source code
 
replace(self, variable, expression, replace_bound=False, alpha_convert=True)
Replace every instance of 'variable' with 'expression'
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
 
__eq__(self, other) source code
 
fol(self) source code
 
_pretty(self) source code
 
visit(self, function, combinator, default)
Recursively visit sub expressions
source code
 
__str__(self) 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.Expression: __call__, __hash__, __lt__, __neq__, __repr__, findtype, free, negate, normalize, substitute_bindings, tp_equals, variables

Inherited from logic.Expression (private): _set_type

Properties [hide private]

Inherited from AbstractDrs: type

Method Details [hide private]

__init__(self, variable, drs)
(Constructor)

source code 
Overrides: object.__init__
(inherited documentation)

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

source code 

Replace every instance of 'variable' with 'expression'

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
(inherited documentation)

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
(inherited documentation)

__eq__(self, other)
(Equality operator)

source code 
Overrides: logic.Expression.__eq__

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
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
Overrides: logic.Expression.__str__