A Unified Framework for Contextual and Factoid Question Generation