class documentation
class BaseModelBuilderCommand(BaseTheoremToolCommand, ModelBuilderCommand): (source)
Known subclasses: nltk.inference.api.ParallelProverBuilderCommand, nltk.inference.mace.MaceCommand
Constructor: BaseModelBuilderCommand(modelbuilder, goal, assumptions)
This class holds a ModelBuilder, a goal, and a list of assumptions. When build_model() is called, the ModelBuilder is executed with the goal and assumptions.
| Method | __init__ |
No summary |
| Method | build |
Attempt to build a model. Store the result to prevent unnecessary re-building. |
| Method | get |
Return the model builder object :return: ModelBuilder |
| Method | model |
Return a string representation of the model |
| Method | _decorate |
No summary |
| Instance Variable | _model |
Undocumented |
| Instance Variable | _modelbuilder |
The theorem tool to execute with the assumptions |
| Instance Variable | _result |
A holder for the result, to prevent unnecessary re-proving |
Inherited from BaseTheoremToolCommand:
| Method | add |
Add new assumptions to the assumption list. |
| Method | assumptions |
List the current assumptions. |
| Method | goal |
Return the goal |
| Method | print |
Print the list of the current assumptions. |
| Method | retract |
Retract assumptions from the assumption list. |
| Instance Variable | _assumptions |
Undocumented |
| Instance Variable | _goal |
Undocumented |
| Parameters | |
| modelbuilder:ModelBuilder | The theorem tool to execute with the assumptions |
| goal | Undocumented |
| assumptions | Undocumented |
| See Also | |
| BaseTheoremToolCommand | |
overridden in
nltk.inference.api.ParallelProverBuilderCommandAttempt to build a model. Store the result to prevent unnecessary re-building.
Return a string representation of the model
| Parameters | |
| format | Undocumented |
| simplify | bool simplify the proof? |
| Returns | |
| str | |
overridden in
nltk.inference.mace.MaceCommand| Parameters | |
| valuation | str with the model builder's output |
| format | str indicating the format for displaying |
| Returns | |
| str | |
overridden in
nltk.inference.api.ParallelProverBuilderCommandA holder for the result, to prevent unnecessary re-proving