Learning Parameterized Task Structure for Generalization to Unseen Entities