Package jazzparser :: Package taggers :: Module chordmap
[hide private]
[frames] | no frames]

Module chordmap

source code

Chord type mappings

Chord supertaggers use mappings from the input chord vocabulary to a smaller one. Various mappings are available and may be selected at model training time.


Author: Mark Granroth-Wilding <mark.granroth-wilding@ed.ac.uk>

Classes [hide private]
  NamedMapping
Just a dictionary with a name.
Functions [hide private]
 
get_chord_mapping(name=None)
Returns a dictionary chord type mapping identified by its name.
source code
 
get_chord_mapping_module_option(name='chord_mapping') source code
Variables [hide private]
  SMALL_MAPPING = {'': '', 'sus4,7': '7', 'b5,7': '7', 'b5': '7'...
  BIG_MAPPING = {'': '', 'sus4,7': 'sus4', 'b5,7': '7', 'b5': 'b...
  IDENTITY_MAPPING = {'': '', 'sus4,7': 'sus4,7', 'b5,7': 'b5,7'...
  NAMED_MAPPINGS = {'big': {'': '', 'sus4,7': 'sus4', 'b5,7': '7...
  MAPPINGS = ['small', 'big', 'none']
  DEFAULT_MAPPING = 'small'
  __package__ = 'jazzparser.taggers'
  mapping = {'': '', 'sus4,7': 'sus4', 'b5,7': '7', 'b5': 'b5', ...
Function Details [hide private]

get_chord_mapping(name=None)

source code 

Returns a dictionary chord type mapping identified by its name. A list of available mappings can be found in MAPPINGS.


Variables Details [hide private]

SMALL_MAPPING

Value:
{'': '', 'sus4,7': '7', 'b5,7': '7', 'b5': '7', 'M7': '', 'sus4': '', \
'm,M7': 'm', 'm,b5': 'o7', '%7': 'o7', 'aug7': 'aug', 'b5,M7': '7', 'a\
ug': 'aug', 'm': 'm', 'aug,M7': 'aug', 'm7': 'm7', '7': '7', 'o7': 'o7\
', '#5,m7': 'm7'}

BIG_MAPPING

Value:
{'': '', 'sus4,7': 'sus4', 'b5,7': '7', 'b5': 'b5', 'M7': 'M7', 'sus4'\
: 'sus4', 'm,M7': 'm', 'm,b5': 'o7', '%7': 'o7', 'aug7': 'aug7', 'b5,M\
7': '7', 'aug': 'aug', 'm': 'm', 'aug,M7': 'aug', 'm7': 'm7', '7': '7'\
, 'o7': 'o7', '#5,m7': 'm7'}

IDENTITY_MAPPING

Value:
{'': '', 'sus4,7': 'sus4,7', 'b5,7': 'b5,7', 'b5': 'b5', 'M7': 'M7', '\
sus4': 'sus4', 'm,M7': 'm,M7', 'm,b5': 'm,b5', '%7': '%7', 'aug7': 'au\
g7', 'b5,M7': 'b5,M7', 'aug': 'aug', 'm': 'm', 'aug,M7': 'aug,M7', 'm7\
': 'm7', '7': '7', 'o7': 'o7', '#5,m7': '#5,m7'}

NAMED_MAPPINGS

Value:
{'big': {'': '', 'sus4,7': 'sus4', 'b5,7': '7', 'b5': 'b5', 'M7': 'M7'\
, 'sus4': 'sus4', 'm,M7': 'm', 'm,b5': 'o7', '%7': 'o7', 'aug7': 'aug7\
', 'b5,M7': '7', 'aug': 'aug', 'm': 'm', 'aug,M7': 'aug', 'm7': 'm7', \
'7': '7', 'o7': 'o7', '#5,m7': 'm7'},
 'none': {'': '', 'sus4,7': 'sus4,7', 'b5,7': 'b5,7', 'b5': 'b5', 'M7'\
: 'M7', 'sus4': 'sus4', 'm,M7': 'm,M7', 'm,b5': 'm,b5', '%7': '%7', 'a\
ug7': 'aug7', 'b5,M7': 'b5,M7', 'aug': 'aug', 'm': 'm', 'aug,M7': 'aug\
,M7', 'm7': 'm7', '7': '7', 'o7': 'o7', '#5,m7': '#5,m7'},
...

mapping

Value:
{'': '', 'sus4,7': 'sus4', 'b5,7': '7', 'b5': 'b5', 'M7': 'M7', 'sus4'\
: 'sus4', 'm,M7': 'm', 'm,b5': 'o7', '%7': 'o7', 'aug7': 'aug7', 'b5,M\
7': '7', 'aug': 'aug', 'm': 'm', 'aug,M7': 'aug', 'm7': 'm7', '7': '7'\
, 'o7': 'o7', '#5,m7': 'm7'}