# credit to Stack Overflow user in the source link # works with 'punkt' and 'stopwords' too import nltk nltk.download('wordnet', quiet=True)