Combining Generative and Discriminative Models in NLP