Learning Distributed Representations for Structured Output Prediction