eta.lf.ELF

class ELF(formula)[source]

Bases: LF

Defines an ELF formula.

Parameters:

formula (str or s-expr) – The formula for this logical form (an S-expression or LISP-formatted string representation thereof).

Methods

bind

Bind the given variable symbol to the given value.

get_formula

Get the formula, applying any variable assignments first.

replacevar

Replace the first variable symbol with the second variable symbol throughout the logical form.

to_nl

Convert the formula to a natural language string.

unbind

Unbind the given variable symbol.

__str__()

Return str(self).

bind(var, val)

Bind the given variable symbol to the given value.

get_formula()

Get the formula, applying any variable assignments first.

replacevar(var1, var2)

Replace the first variable symbol with the second variable symbol throughout the logical form.

to_nl()

Convert the formula to a natural language string.

unbind(var)

Unbind the given variable symbol.