Package jazzparser :: Package taggers :: Package candc :: Module tagger :: Class CandcMultiTagger
[hide private]
[frames] | no frames]

Class CandcMultiTagger

source code

    object --+            
             |            
 tagger.Tagger --+        
                 |        
models.ModelTagger --+    
                     |    
           CandcTagger --+
                         |
                        CandcMultiTagger

Uses the C&C supertagger component to get multiple tags for each word.

Nested Classes [hide private]

Inherited from CandcTagger: MODEL_CLASS

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
The tagger must have reference to the grammar being used to parse the input.
source code
 
_tags_from_output(self, output) source code

Inherited from CandcTagger: get_signs_for_word, get_word

Inherited from CandcTagger (private): _get_input_length

Inherited from tagger.Tagger: get_all_signs, get_signs, get_string_input, get_tag_probability, get_word_duration

Inherited from tagger.Tagger (private): _get_name

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from tagger.Tagger: check_options

Static Methods [hide private]

Inherited from models.ModelTagger: partition_model_name

Class Variables [hide private]
  command = 'msuper'
  extra_args = ['--beta', '0.0']
  TAGGER_OPTIONS = CandcTagger.TAGGER_OPTIONS+ [ModuleOption('ig...
Tagger-specific options.

Inherited from CandcTagger: COMPATIBLE_FORMALISMS, DEFAULT_UNSEEN_TAG_PROB, INPUT_TYPES, TAG_BATCH_RATIO

Inherited from tagger.Tagger: LEXICAL_PROBABILITY, shell_tools

Properties [hide private]

Inherited from CandcTagger: input_length

Inherited from tagger.Tagger: name

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

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.

Parameters:
  • original_input - the input in its original, unprocessed form. This will usually be a string. This is optional, but in some circumstances things might fall apart if it hasn't been given. E.g. using a backoff model as backoff from a tagging model requires the original input to be passed to the backoff model.
  • logger - optional progress logger. Logging will be sent to this during initialization of the tagger and tagging. If not given, the logging will be lost. Subclasses may access the logger (or a dummy logger if none was given) in self.logger.
Overrides: object.__init__
(inherited documentation)

Class Variable Details [hide private]

TAGGER_OPTIONS

Tagger-specific options. List of ModuleOptions.

Value:
CandcTagger.TAGGER_OPTIONS+ [ModuleOption('ignore-unknown', filter= st\
r_to_bool, help_text= "Ignore any tags that the tagger returns but whi\
ch " "are not found in the grammar. By default, an error will " "be th\
rown.", usage= "ignore-unknown=True (default False)", default= False),\
]