learning structured prediction models: a large margin