Home | Trees | Indices | Help |
|
---|
|
object --+ | PredictorActivator
Query the predictors listed in the registry to get their suggestions.
This class has access to a PredictorRegistry and asks the predictors listed in this PredictorRegistry to call their predict() method, store the resulting Prediction instances, merge them into a single Prediction instance and return it.
![]() |
Class Hierarchy for PredictorActivator |
|
|||
|
|||
|
|||
Prediction |
|
||
Inherited from |
|
|||
Inherited from |
|
PredictorActivator creator.
|
Worker function for the predictor predict() methods. This method is used as the predictors workers target. It push the predictor's prdct.Predictor.predict method result (a Prediction instance) in a queue (which is used because it is thread-safe).
|
Build a list of every predicted words. Call the predict() method of every predictors in the registry then merge their Prediction into a single Prediction instance.
Change Log:
Note: Using multi-processing allow significant speed boost. The next benchmark have been maid runing 100 * 10 different contexts predictions: Total time without multi-processing: 86.785 s Total time wit multi-processing: 76.513 s To Do (0.0.9): Demonize the processes, set a timeout value. When the time runs out the unfinished workers return their results as is. This can alter the prediction qality but totaly avoid any possible "slow predictions". |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Jul 14 21:07:50 2015 | http://epydoc.sourceforge.net |