AD3: A Fast Decoder for Structured Prediction