Learning with Violable Constraints