Confidence Estimation in Structured Prediction