stanfordnlp / python-stanford-corenlp

Python interface to CoreNLP using a bidirectional server-client interface.
MIT License
516 stars 105 forks source link

Contents of bin/javanlp.sh in $JAVANLP_HOME #1

Closed dan-zheng closed 7 years ago

dan-zheng commented 7 years ago

According to the documentation, $JAVANLP_HOME should set to the location of a Stanford CoreNLP checkout.

I downloaded the latest version of CoreNLP (3.8.0) from this link and set $JAVANLP_HOME to its location. However, it didn't work because this Python module expects the $JAVANLP_HOME to contain bin/javanlp.sh:

start_cmd = "{javanlp}/bin/javanlp.sh edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port {port} -timeout {timeout}".format(
            javanlp=os.getenv("JAVANLP_HOME"),
            port=port,
            timeout=timeout)

However, the version of CoreNLP that I downloaded contains no such bin/javanlp.sh. It seems from the command that bin/javanlp.sh should contain something as simple as java -mx4g -cp "{javanlp}".

Is there a version of CoreNLP that contains bin/javanlp.sh out of the box? If not (which I suspect there isn't), is there a reason why this module looks for a bin/javanlp.sh script instead of simply running a command like java -mx4g -cp "$JAVANLP_HOME/*" ...?

yuhaozhang commented 7 years ago

@dan-zheng The bin/javanlp.sh script is only available in an internal checkout of the javanlp repo (which is different from the public corenlp repo). I talked to @arunchaganty and he said this could be fixed soon.

arunchaganty commented 7 years ago

Apologies, I missed this issue. Will resolve it over this weekend.

dan-zheng commented 7 years ago

I see, thank you!

dan-zheng commented 7 years ago

Any updates?

vzhong commented 7 years ago

@arunchaganty is there a reason why we started using $JAVANLP_HOME and a Git checkout instead of taking in a hostname and a port to the CoreNLP server like before?

ArlenZhang commented 7 years ago

any updates?

yuhaozhang commented 7 years ago

@dan-zheng @ArlenZhang Sorry that this has been delayed for quite a while. But I just made a quick fix to make it work for users outside of Stanford. Right now the package is referring to the java CoreNLP package which can be downloaded from the CoreNLP website, instead of Stanford's internal checkout.