| Trees | Indices | Help |
|
|---|
|
|
object --+
|
taggers.models.TaggerModel --+
|
base.BackoffModel --+
|
HmmPathModel
Model type that uses an ngram model to assign a tonal space path to a sequence. This class provides the interface to the model training and decoding. The details are all implemented in the model class above.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
|||
|
|||
MODEL_TYPE = hash(x) |
|||
TRAINING_OPTIONS = [ModuleOption('n', filter= int, help_text=
|
|||
|
|||
| labels | |||
|
readable_parameters Produce a human-readable repr of the params of the model |
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
Creates an empty, untrained model. To load a previously stored model, use from_file(). Optionally stores some custom descriptive text. This will be included in the descriptive text that gets stored along with the model.
|
Trains the loaded model using the data in the list of sequences.
|
Subclasses should implement this method to load up the model data given in the argument data. They should return an instance of themselves. The data will be in the form of a dictionary, as returned by the class' _get_model_data(). A default implementation that just uses simple pickling is provided. It assumes that the class can be instantiated using no arguments.
|
Subclasses should implement this method to return the raw data of the model in a form that can be pickled and written out to a file. A default implementation to complement the implementation of _load_model is provided. *** IMPORTANT: *** Some implementations perform part of the model storage in their _get_model_data method, so you shouldn't use this just to get the data if you don't plan to store it. (Not sure why you'd want the raw data anyway and this is a private method - just warning you!)
|
|
|||
TRAINING_OPTIONS
|
|
|||
labels
|
readable_parametersProduce a human-readable repr of the params of the model
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Nov 26 16:04:56 2012 | http://epydoc.sourceforge.net |