Package prest :: Module prdct :: Class Predictor
[hide private]
[frames] | no frames]

Class Predictor

source code

object --+
         |
        Predictor

Base class for predictors.

Class Hierarchy for Predictor
Class Hierarchy for Predictor

Instance Methods [hide private]
 
__init__(self, config, contextMonitor)
Predictor creator.
source code
 
predict(self, maxPartialPredictionSize, stopList) source code
 
learn(self, text) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __metaclass__ = abc.ABCMeta
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, config, contextMonitor)
(Constructor)

source code 

Predictor creator.

Parameters:
  • config (prdct.Configuration) - The config is used to retrieve the predictor settings from the config file.
  • contextMonitor (cntxt.ContextMonitor) - The contextMonitor is needed because it allow the predictor to get the input buffers tokens.
Overrides: object.__init__

predict(self, maxPartialPredictionSize, stopList)

source code 
Decorators:
  • @abc.abstractmethod

learn(self, text)

source code 
Decorators:
  • @abc.abstractmethod