def ensure_nltk_packages(): for package in ('stopwords', 'punkt', 'wordnet'): nltk.download(package, quiet=True)