Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class not found when trying to start the preprocessor? #146

Open
Broham opened this issue Aug 13, 2018 · 1 comment
Open

Class not found when trying to start the preprocessor? #146

Broham opened this issue Aug 13, 2018 · 1 comment

Comments

@Broham
Copy link

Broham commented Aug 13, 2018

I've been following along on the tutorial here: http://iepy.readthedocs.io/en/latest/tutorial.html

Everything seemed to be going fine, but when I tried to run the preprocessor:

python bin/preprocess.py

I got the error:

Loading StanfordCoreNLP...
Error running '/Users/abemiessler/Library/Application Support/iepy/stanford-corenlp-full-2015-04-20/corenlp.sh -outputFormat xml -threads 4 -annotators tokenize,ssplit,pos,lemma,ner,parse,dcoref'
Output was: 'b'usage: dirname path\n/usr/bin/java -mx3g -cp "/*" edu.stanford.nlp.pipeline.StanfordCoreNLP -outputFormat xml -threads 4 -annotators tokenize,ssplit,pos,lemma,ner,parse,dcoref\nError: Could not find or load main class edu.stanford.nlp.pipeline.StanfordCoreNLP\n''

I checked and made sure that my java path was set correctly and everything. I confirmed that the StanfordCore NLP is installed (it's at this path: ~/Library/Application Support/iepy/stanford-corenlp-full-2015-04-20 if that matters)

Why would it not be finding the class above?

@nilutz
Copy link

nilutz commented Feb 15, 2019

This is a hack that solves the problem.

The stanfordnlp library is called via
JAVAHOME -mx3g -cp "$scriptdir/*" edu.stanford.nlp.pipeline.StanfordCoreNLP. At least on my mac with Mojave 10.14.3 this leads to the command:

path\n/usr/bin/java -mx3g -cp **"/*"** edu.stanford.nlp.pipeline.StanfordCoreNLP

The "/*" part doesn't exists as a command. If you want to it get to work you can edit the source file. E.g.: Go into ~/Library/Application Support/iepy/stanford-corenlp-full-2015-04-20/corenlp.sh and switch: "$scriptdir/*" to "*".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants