Uncertainty in Natural Language Generation: From Theory to Applications