the nltk.parse.stanford in nltk3.2.5.
from nltk.parse.stanford import *
# CoreNLPServer = CoreNLPServer(path_to_jar="/home/fonttian/NLP/stanford/")
# dep_parser=StanfordDependencyParser(model_path="/home/fonttian/NLP/stanford/stanford-chinese-corenlp-2017-06-09-models/edu/stanford/nlp/models/lexparser/chinesePCFG.ser.gz")
====>
dep_parser=StanfordDependencyParser(model_path="edu/stanford/nlp/models
/lexparser/chinesePCFG.ser.gz") File "/home/fonttian/anaconda3/lib/python3.6/site- packages/nltk/parse/stanford.py", line 52, in init key=lambda model_path: os.path.dirname(model_path) File "/home/fonttian/anaconda3/lib/python3.6/site- packages/nltk/internals.py", line 716, in find_jar_iter raise LookupError('\n\n%s\n%s\n%s' % (div, msg, div)) LookupError:
============================
NLTK was unable to find stanford-parser\.jar! Set the CLASSPATH
environment variable.
For more information, on stanford-parser\.jar, see:
<https://nlp.stanford.edu/software/lex-parser.shtml>
===============================