| Trees | Indices | Help |
|
|---|
|
|
object --+
|
tagger.Tagger --+
|
models.ModelTagger --+
|
SegmidiTagger
Base class for segmented MIDI taggers.
Inherits from jazzparser.taggers.models.ModelTagger, so subclasses should implement the abstract methods of this.
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
COMPATIBLE_FORMALISMS =
|
|||
INPUT_TYPES = List of allowed input datatypes. |
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
The tagger must have reference to the grammar being used to parse the input. It must also be given the full input when instantiated. The format of this input will depend on the tagger: for example, it might be a string or a MIDI file.
|
Returns a list of tuples Each signtup is a (sign,tag,probability) tuple representing a sign that the tagger wishes to add to the chart in this position. How many are returned is up to the tagger (it may wish to return more in cases where there are no clear winners, for example). If the tag is not found in the grammar, sign will be None. Returned list is sorted by probability, highest first. offset may be set >0 in order to retrieve further signs once some have already been returned. If offset=k, the tagger should disregard all the signs that would have been returned for offset<k and return the next bunch - as many as it sees fit. offset is incremented each time the parse fails. The simplest approach, and that employed by most taggers, has some
signs for each word and none spanning more than one word. That is, the
tuples in the list would be of the form
|
Returns the input word at this index. This does not need to be a string, but must have a sensible __str__, so that it can be converted to a readable string. The purpose of this is to provide a readable form of the input for the parser to store in derivation traces.
|
Returns a list of string representations of the inputs. This is just a convenience function, which uses whatever representation gets returned by get_word() to produce a representation of the whole input.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Nov 26 16:04:58 2012 | http://epydoc.sourceforge.net |