I am working on a project that requires me to tag tokens using nltk and python. So I wanted to use this. But came up with a few problems. I went through a lot of other already a
I use Jupyter Notebook with Pycharm. I tried the Run Configuration in Pycharm to set env variable, but not work. So I use os.environ to set it in the code:
import os
os.environ["CLASSPATH"] = "/yourPath/stanford-parser-full-2018-10-17:yourPath/stanford-postagger-full-2018-10-16:yourPath/stanford-ner-2018-10-16"
os.environ["STANFORD_MODELS"] = "yourPath/stanford-postagger-full-2018-10-16/models:yourPath/stanford-ner-2018-10-16/classifiers"
stanford_tagger = StanfordPOSTagger('english-bidirectional-distsim.tagger')
Hope it will help!