Package jazzparser :: Package data :: Package input :: Class WeightedChordLabelInput
[hide private]
[frames] | no frames]

Class WeightedChordLabelInput

source code

 object --+        
          |        
InputReader --+    
              |    
          Input --+
                  |
                 WeightedChordLabelInput

Input wrapper for a lattice of chord labels, including a set of chord labels for each timestep, each with a probability. The labels themselves are similar to the chord in a DbInput and are represented using jazzparser.misc.chordlabel.data.ChordLabels.

The lattice should be a list of timesteps. Each timestep should be a list of (label,prob) tuples, where label is a ChordLabel and prob is a probability.

Instance Methods [hide private]
 
__init__(self, lattice, *args, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code
 
__repr__(self)
repr(x)
source code
 
__len__(self) source code
 
__getitem__(self, item) source code
 
slice(self, start=None, end=None)
Subclasses should provide a way of slicing (taking a subsequence of) the input that returns an input of the original type.
source code
 
apply_ratio_beam(self, ratio=0.0001)
Applies a beam to remove all values from the lattice whose probability is less than the given ratio of the highest probability for that timestep.
source code

Inherited from Input: get_gold_analysis

Inherited from Input (private): _get_string_name

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

Class Methods [hide private]

Inherited from InputReader: process_option_dict

Static Methods [hide private]
 
from_file(filename, options={}) source code
Class Variables [hide private]
  FILE_INPUT_OPTIONS = []

Inherited from InputReader: SHELL_TOOLS

Properties [hide private]

Inherited from Input: string_name

Inherited from object: __class__

Method Details [hide private]

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

source code 

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

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__len__(self)
(Length operator)

source code 
Overrides: Input.__len__

__getitem__(self, item)
(Indexing operator)

source code 
Overrides: Input.__getitem__

slice(self, start=None, end=None)

source code 

Subclasses should provide a way of slicing (taking a subsequence of) the input that returns an input of the original type.

Overrides: Input.slice
(inherited documentation)

apply_ratio_beam(self, ratio=0.0001)

source code 

Applies a beam to remove all values from the lattice whose probability is less than the given ratio of the highest probability for that timestep.

Parameters:
  • ratio (float) - the max ratio of a probability to the highest probability in the timestep

from_file(filename, options={})
Static Method

source code 
Overrides: InputReader.from_file