A Contrastive Framework for Neural Text Generation