A Retrieve-and-Edit Framework for Predicting Structured Outputs