stanfordnlp / python-stanford-corenlp

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

AssertionError: Please define $CORENLP_HOME where your CoreNLP Java checkout is #13

Closed hexingren closed 6 years ago

hexingren commented 6 years ago

I was using CoreNLP 3.9.1, and tried to define the environment variable $CORENLP_HOME that points to the unzipped directory using the following code. """ import os os.environ["$CORENLP_HOME"] = r'my_path\stanford-corenlp-full-2018-02-27' """ However, I still got the AssertionError: Please define $CORENLP_HOME where your CoreNLP Java checkout is. How should I define the required environment variable here? Does this interface work with the latest version of CoreNLP (v 3.9.1)? Thanks.

gangeli commented 6 years ago

$5 says you need to set os.environ["CORENLP_HOME"] rather than os.environ["$CORENLP_HOME"]. Alternately, you can start your code with:

CORENLP_HOME=/path/to/corenlp  python blah.py

Offer not redeemable for monetary value in any state.

hexingren commented 6 years ago

I see. Thanks!