An Automatic Wordspotting Framework for Medieval Manuscripts