Package jazzparser :: Package backoff :: Package ngram :: Module midi :: Class MidiHmmPathBuilder
[hide private]
[frames] | no frames]

Class MidiHmmPathBuilder

source code

         object --+    
                  |    
base.BackoffBuilder --+
                      |
                     MidiHmmPathBuilder

Use an HP chord labeler to get a chord lattice and HmmPath on the lattice.

Instance Methods [hide private]
 
__init__(self, input, options={}, grammar=None, *args, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
jazzparser.formalisms.base.semantics.lambdacalc.Semantics subclass instance
get_tonal_space_path(self, rank=0)
This is the main interface method.
source code

Inherited from base.BackoffBuilder: get_all_paths

Inherited from base.BackoffBuilder (private): _get_input_length, _get_name

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

Class Methods [hide private]

Inherited from base.BackoffBuilder: check_options

Class Variables [hide private]
  MODEL_CLASS = None
hash(x)
  BUILDER_OPTIONS = HmmPathBuilder.BUILDER_OPTIONS+ [ModuleOptio...
  INPUT_TYPES = ['segmidi']
Properties [hide private]
  num_paths

Inherited from base.BackoffBuilder: input_length, name

Inherited from object: __class__

Method Details [hide private]

__init__(self, input, options={}, grammar=None, *args, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

get_tonal_space_path(self, rank=0)

source code 

This is the main interface method.

Parameters:
  • rank - the rank of the path the get, where 0 is the highest ranked path
Returns: jazzparser.formalisms.base.semantics.lambdacalc.Semantics subclass instance
the rankth highest ranked path through the tonal space for this sequence. Returns None if there is no path with this rank.
Overrides: base.BackoffBuilder.get_tonal_space_path
(inherited documentation)

Class Variable Details [hide private]

BUILDER_OPTIONS

Value:
HmmPathBuilder.BUILDER_OPTIONS+ [ModuleOption('labeling_model', help_t\
ext= "Model name for chord labeler", usage= "labeling_model=M, where M\
 is a trained chord labeling model", required= True), ModuleOption('pa\
rtition_labeler', filter= str_to_bool, help_text= "By default, the cho\
rd labeling model is not loaded " "with a partition number, even if th\
e supertagging model is. " "If this is True, the same partition number\
 will be used for " "the labeler's model as was given to the supertagg\
er.", usage= "partition_labeler=B, where B is True or False", default=\
...

Property Details [hide private]

num_paths

Get Method:
unreachable.num_paths(self)