Structured Learning via Logistic Regression