Package nltk :: Package inference :: Module api :: Class ModelBuilderCommandDecorator
[hide private]
[frames] | no frames]

type ModelBuilderCommandDecorator

source code

             object --+        
                      |        
     TheoremToolCommand --+    
                          |    
TheoremToolCommandDecorator --+
                              |
             object --+       |
                      |       |
     TheoremToolCommand --+   |
                          |   |
        ModelBuilderCommand --+
                              |
                             ModelBuilderCommandDecorator

A base decorator for the ModelBuilderCommand class from which other prover command decorators can extend.

Instance Methods [hide private]
 
__init__(self, modelBuilderCommand) source code
nltk.sem.evaluate.Valuation
build_model(self, verbose=False)
Attempt to build a model.
source code
 
model(self, format=None)
Return a string representation of the model
source code
 
_decorate_model(self, valuation_str, format=None)
Modify and return the proof string
source code
 
get_model_builder(self)
Return the model builder object
source code

Inherited from TheoremToolCommandDecorator: add_assumptions, assumptions, goal, print_assumptions, retract_assumptions

Method Details [hide private]

__init__(self, modelBuilderCommand)
(Constructor)

source code 
Parameters:
  • modelBuilderCommand - ModelBuilderCommand to decorate
Overrides: TheoremToolCommandDecorator.__init__

build_model(self, verbose=False)

source code 

Attempt to build a model. Store the result to prevent unnecessary re-building.

Returns: nltk.sem.evaluate.Valuation
A model if one is generated; None otherwise.
Overrides: ModelBuilderCommand.build_model

model(self, format=None)

source code 

Return a string representation of the model

Parameters:
  • simplify - boolean simplify the proof?
Returns:
str
Overrides: ModelBuilderCommand.model

_decorate_model(self, valuation_str, format=None)

source code 

Modify and return the proof string

Parameters:
  • valuation_str - str with the model builder's output
  • format - str indicating the format for displaying
Returns:
str

get_model_builder(self)

source code 

Return the model builder object

Returns:
ModelBuilder
Overrides: ModelBuilderCommand.get_model_builder
(inherited documentation)