coco-caption
coco-caption copied to clipboard
Semgrex Class Not Found Exception
Even after installing Stanford Core NLP 3.9.2 and pasting the core and the models.jar files in lib,further adding all the jars of core-nlp folder into the CLASSPATH the following issue comes
Exception in thread "main" java.lang.NoClassDefFoundError: edu/stanford/nlp/semgraph/semgrex/SemgrexPattern
at edu.anu.spice.SpiceParser.
Tried this with java 8 and java 9
Came across the same problem. Other metrics are working fine.
Same issue here with Stanford Core NLP version 3.9.2.
The solution is to use Stanford Core NLP 3.6.0 as specified in the get_stanford_models.sh
script.
The simplest way to get the correct model is to run ./get_stanford_models.sh
as stated in the README.
Alternatively you can run cocoEvalCapDemo.ipynb
notebook, which will additionally verify that your installation is working.
Edit: Add solution to issue
Pay special attention to the get_stanford_models.sh
script, you may ignore running the script but download the stanford-corenlp-full-2015-12-09 (Stanford Core NLP 3.6.0) package and unzip it yourself, but there are some important file movement in that script:for example: mv $SPICELIB/$CORENLP/$JAR.jar $SPICELIB/ mv $SPICELIB/$CORENLP/$JAR-models.jar $SPICELIB/
,if you downloaded the zip file yourself cause of the low speed on the remote server like me, you should do the file movements yourself too.