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

type ParallelProverBuilder

source code

  object --+    
           |    
      Prover --+
               |
  object --+   |
           |   |
ModelBuilder --+
               |
              ParallelProverBuilder

This class stores both a prover and a model builder and when either prove() or build_model() is called, then both theorem tools are run in parallel. Whichever finishes first, the prover or the model builder, is the result that will be used.

Instance Methods [hide private]
 
__init__(self, prover, modelbuilder) source code
tuple: (bool, str)
_prove(self, goal=None, assumptions=None, verbose=False)
Returns: Whether the proof was successful or not, along with the proof
source code
tuple of (bool, nltk.sem.evaluate.Valuation)
_build_model(self, goal=None, assumptions=None, verbose=False)
Perform the actual model building.
source code
 
_run(self, goal, assumptions, verbose) source code

Inherited from Prover: prove

Inherited from ModelBuilder: build_model

Method Details [hide private]

__init__(self, prover, modelbuilder)
(Constructor)

source code 
Overrides: object.__init__
(inherited documentation)

_prove(self, goal=None, assumptions=None, verbose=False)

source code 
Returns: tuple: (bool, str)
Whether the proof was successful or not, along with the proof
Overrides: Prover._prove
(inherited documentation)

_build_model(self, goal=None, assumptions=None, verbose=False)

source code 

Perform the actual model building.

Returns: tuple of (bool, nltk.sem.evaluate.Valuation)
Whether a model was generated, and the model itself
Overrides: ModelBuilder._build_model
(inherited documentation)