Chord diagram parsing