Error when trying the demo CoreNLP script

44 views
Skip to first unread message

Shreyans Jasoriya

unread,
Feb 25, 2019, 11:44:54 AM2/25/19
to StanfordNLP: A Python NLP Library for Many Human Languages
Hi,

from stanfordnlp.server import CoreNLPClient
import os
os.environ["CORENLP_HOME"] = r'C:\Users\Shreyans\Downloads\stanford-ner-2018-10-16\stanford-ner-2018-10-16'

text = "Chris Manning is a nice person. Chris wrote a simple sentence. He also gives oranges to people."

client = CoreNLPClient(annotators=['tokenize','ssplit','pos','lemma','ner','depparse','coref'], timeout=30000, memory='8G')

The last line gives me the following error:

TypeError: super(type, obj): obj must be an instance or subtype of type

Would you know what causes this problem? And also I didn't understand the installation instructions when they said the move the model jars to the distribution folder. Where is the distribution folder located?

Peng Qi

unread,
Feb 25, 2019, 12:35:38 PM2/25/19
to StanfordNLP: A Python NLP Library for Many Human Languages
Thanks for your interest in the StanfordNLP library! From your python code, it looks like you're using the NER tool alone instead of the CoreNLP software. Could you try again with the full CoreNLP package? (see https://stanfordnlp.github.io/CoreNLP/)
Reply all
Reply to author
Forward
0 new messages