| Trees | Indices | Help |
|
|---|
|
|
object --+
|
tagger.Tagger --+
|
ChordLabelNgramTagger
Tagger that loads a chord labeling model to assign chord labels to MIDI data, then hands over to a chord supertagger to process the output of the labeler.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
COMPATIBLE_FORMALISMS =
|
|||
TAGGER_OPTIONS = MultiChordNgramTagger.TAGGER_OPTIONS+ [ModuleTagger-specific options. |
|||
INPUT_TYPES = List of allowed input datatypes. |
|||
name =
|
|||
shell_tools = Tagger.shell_tools+ [tools.ChordLabelTool(),]Interactive shell tools available when this tagger is used. |
|||
LEXICAL_PROBABILITY = TrueSome models provide lexical probabilities that the parsing models can use. |
|||
|
|||
|
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.
|
Lexical probabilities for a probabilistic parser. This will only get used if the parsing model can't compute a probability itself (i.e. in the case of MIDI input). |
|
|||
TAGGER_OPTIONSTagger-specific options. List of ModuleOptions.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Nov 26 16:04:58 2012 | http://epydoc.sourceforge.net |