class documentation
class BinaryExpression(Expression): (source)
Known subclasses: nltk.sem.drt.DrtBinaryExpression
, nltk.sem.logic.BooleanExpression
, nltk.sem.logic.EqualityExpression
Constructor: BinaryExpression(first, second)
Undocumented
Method | __eq__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __ne__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | findtype |
:see Expression.findtype() |
Method | visit |
No summary |
Instance Variable | first |
Undocumented |
Instance Variable | second |
Undocumented |
Property | type |
Undocumented |
Method | _str |
Undocumented |
Inherited from Expression
:
Class Method | fromstring |
Undocumented |
Method | __and__ |
Undocumented |
Method | __call__ |
Undocumented |
Method | __gt__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __lt__ |
Undocumented |
Method | __neg__ |
Undocumented |
Method | __or__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | applyto |
Undocumented |
Method | constants |
Return a set of individual constants (non-predicates). :return: set of Variable objects |
Method | equiv |
Check for logical equivalence. Pass the expression (self <-> other) to the theorem prover. If the prover says it is valid, then the self and other are equal. |
Method | free |
Return a set of all the free (non-bound) variables. This includes both individual and predicate variables, but not constants. :return: set of Variable objects |
Method | make_ |
Undocumented |
Method | negate |
If this is a negated expression, remove the negation. Otherwise add a negation. |
Method | normalize |
Rename auto-generated unique variables |
Method | predicates |
Return a set of predicates (constants, not variables). :return: set of Variable objects |
Method | replace |
Replace every instance of 'variable' with 'expression' :param variable: Variable The variable to replace :param expression: Expression The expression with which to replace it :param replace_bound: bool Should bound variables be replaced... |
Method | simplify |
No summary |
Method | substitute |
No summary |
Method | typecheck |
Infer and check types. Raise exceptions if necessary. |
Method | variables |
Return a set of all the variables for binding substitution. The variables returned include all free (non-bound) individual variables and any variable starting with '?' or '@'. :return: set of Variable objects... |
Method | visit |
Recursively visit subexpressions. Apply 'function' to each subexpression and pass the result of each function application to the 'combinator' for aggregation. The combinator must have the same signature as the constructor... |
Method | _set |
Set the type of this expression to be the given type. Raise type exceptions where applicable. |
Class Variable | _logic |
Undocumented |
Class Variable | _type |
Undocumented |
overrides
nltk.sem.logic.Expression.__eq__
overridden in
nltk.sem.drt.DrtConcatenation
, nltk.sem.drt.DrtConcatenation
Undocumented
overrides
nltk.sem.logic.Expression.__ne__
overridden in
nltk.sem.drt.DrtConcatenation
, nltk.sem.drt.DrtConcatenation
Undocumented
overrides
nltk.sem.logic.Expression.__str__
overridden in
nltk.sem.drt.DrtConcatenation
, nltk.sem.drt.DrtConcatenation
Undocumented
overrides
nltk.sem.logic.Expression.visit
overridden in
nltk.sem.drt.DrtConcatenation
, nltk.sem.drt.DrtConcatenation
See Also | |
Expression.visit() |
overridden in
nltk.sem.drt.DrtConcatenation
, nltk.sem.drt.DrtConcatenation
, nltk.sem.logic.AndExpression
, nltk.sem.logic.OrExpression
Undocumented