from stanfordcorenlp import StanfordCoreNLP
# Other human languages support, e.g. Chinese
sentence = '清华大学位于北京。'
with StanfordCoreNLP(r'install_packages/stanford-corenlp-full-2016-10-31', lang='zh') as nlp:
print(nlp.word_tokenize(sentence))
print(nlp.pos_tag(sentence))
print(nlp.ner(sentence))
print(nlp.parse(sentence))
print(nlp.dependency_parse(sentence))
I used the example code:
And my output is:
It seems that parse code is able to print correct result, but other codes can't. I don't know why this happened.