| Trees | Indices | Help |
|
|---|
|
|
object --+
|
nltk.tag.hmm.HiddenMarkovModelTrainer --+
|
PicklableHmmTrainer
We override HiddenMarkovModelTrainer to overcome the fact that it produces HMMs that can't be pickled. We only make supervised trained HMMs picklable at the moment.
This is quite a nasty hack to overcome the fact that NLTK HMMs can't be stored and also can't be pickled if constructed using the default trainer. However, this is not very stable, since someone could, for example, set some attribute of the model to be a Python lambda and pickling would once again fail.
|
|||
| HiddenMarkovModelTagger |
|
||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
If you set 'estimator' in the kwargs, make sure it's a top-level named function, not a lambda, or else you won't be able to pickle your HMM.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Nov 26 16:04:58 2012 | http://epydoc.sourceforge.net |