A parser for jazz chord sequences to infer harmonic structure