Package jazzparser :: Package data :: Module parsing
[hide private]
[frames] | no frames]

Module parsing

source code

Some data utilities relating to parsing annotated data to evaluate model.

Tools for running the parser on input from the database to test the data. Note that these should be used on the database mirrors (see jazzparser.data.db_mirrors) so that they can be run independently of the database itself.

This module now provides some utilities for the parsing routines. The actual evaluation routines are in jazzparser.evaluation.parsing.


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

Classes [hide private]
  ParseResults
A simple wrapper object to store the results of a parse, plus the gold standard result, so that they can easily be dumped out to a file using pickle.
Functions [hide private]
 
keys_for_sequence(sequence, grammar=None)
Takes a chord sequence from the chord corpus and parses using its annotations.
source code
Variables [hide private]
  __package__ = 'jazzparser.data'
Function Details [hide private]

keys_for_sequence(sequence, grammar=None)

source code 

Takes a chord sequence from the chord corpus and parses using its annotations. Returns a list of the key (as a pitch class integer) for each chord.

This is simply worked out, once the parse is done. Every chord in a cadence has the same key as the resolution of the cadence, which can be read off by taking the equal temperament pitch class for the tonal space point of the resolution.