>>> nltk.download('stopwords')
[nltk_data] Error loading stopwords: <urlopen error [SSL:
[nltk_data] CERTIFICATE_VERIFY_FAILED] certificate verify failed:
[nltk_data] unable to get local issuer certificate (_ssl.c:1131)>
False
import nltk
import ssl
try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
pass
else:
ssl._create_default_https_context = _create_unverified_https_context
nltk.download('stopwords')
In https://github.com/stanford-oval/genienlp/blob/master/genienlp/ned/ned_utils.py#L38, if the download of nltk stopwords fails, it does so silently. The quiet flag suppresses errors.
Error seen:
Solution from https://stackoverflow.com/questions/38916452/nltk-download-ssl-certificate-verify-failed: