I\'m encountering a difficulty when using NLTK corpora (in particular stop words) in AWS Lambda. I\'m aware that the corpora need to be downloaded and have done so with NLTK
If your stopwords corpus is under /nltk_data (based on root, not under your home directory), you need to tell the nltk before you try to access a corpus:
from nltk.corpus import stopwords
nltk.data.path.append("/nltk_data")
stopwords = stopwords.words('english')