Musical Form Reconstruction in Printed and Handwritten Lead Sheets via Optical Recognition of Chord Symbols