eta.lf.LF
- class LF(formula)[source]
Bases:
object
Defines an abstract logical form.
A logical form (whether ULF or ELF) must contain a formula, variable bindings, functions for binding/unbinding variables, for replacing variables, and for getting the formula (or a natural language representation thereof) after making all variable assignments.
- Parameters:
formula (str or s-expr) – The formula for this logical form (an S-expression or LISP-formatted string representation thereof).
- formula
The formula for this logical form.
- Type:
s-expr
Methods
Bind the given variable symbol to the given value.
Get the formula, applying any variable assignments first.
Replace the first variable symbol with the second variable symbol throughout the logical form.
Convert the formula to a natural language string.
Unbind the given variable symbol.