Exploiting symbolic learning in visual inspection