coli-saar / am-parser

Modular implementation of an AM dependency parser in AllenNLP.
Apache License 2.0
30 stars 10 forks source link

java exception when running predict_from_raw_text.sh #91

Open ablodge opened 3 years ago

ablodge commented 3 years ago

Hello. I am getting a confusing error when running the script predict_from_raw_text.sh.

Error: Could not find or load main class de.saar.coli.amrtagging.formalisms.amr.tools.EvaluateCorpus
Caused by: java.lang.ClassNotFoundException: de.saar.coli.amrtagging.formalisms.amr.tools.EvaluateCorpus

There may be something simple that I'm doing wrong, but it's not obvious to me how to resolve this.

I am running on: Mac OS JDK 16.0.2

jgroschwitz commented 3 years ago

Hi Austin, cool that you're trying our parser! The problem sounds like the am-tools.jar file is missing. It should be downloaded automatically by the bash script, but maybe something went wrong. Can you check if you have an am-tools.jar file in your main directory of am-parser?

ablodge commented 3 years ago

Sorry for the delay! My work on this got backlogged. I do have am-tools.jar in the main directory. I also found a simple fix for this issue.

If I change line 34 in eval_AMR_new.sh from

java -Xmx2G -cp "$ALTO_PATH" de.saar.coli.amrtagging.formalisms.amr.tools.EvaluateCorpus -c "$1" -o "$dir" --relabel --wn "$wordnet_path" --lookup "$lookup" --th 10

to

java -Xmx2G -cp "$3" de.saar.coli.amrtagging.formalisms.amr.tools.EvaluateCorpus -c "$1" -o "$dir" --relabel --wn "$wordnet_path" --lookup "$lookup" --th 10

then for some reason it works.

jgroschwitz commented 3 years ago

Hi Austin, I'm glad you found a workaround, thanks for sharing! It is indeed strange though, I'm not quite sure what's going on there -- I'm curious and will look into it, maybe I can figure it out.