Learning to Predict from Textual Data