I have a script which utilizes NLTK's WordNetLemmatizer, which, in turn, requires corpora/wordnet to be present in a certain location on the user's system. WordNetLemmatizer is imported as follows:
from nltk.stem.wordnet import WordNetLemmatizer
My script (actually, a pretty hefty program) is compiled into an executable, and I can't expect the end-user to install NLTK components. I'd like to include corpora/wordnet in my program's directory.
Is there a way to get WordNetLemmatizer to look for corpora/wordnet in an explicitly specified location, in particular, in the same directory as the executable file generated from my python script?