jflanigan / jamr

JAMR Parser and Generator
BSD 2-Clause "Simplified" License
193 stars 49 forks source link

Array Index Out of Bounds Exception when running JAMR #27

Closed summerstay closed 7 years ago

summerstay commented 7 years ago

I believe I have followed all the steps in the readme successfully. I am now trying the last step, scripts/PARSE.sh < input_file > output_file 2> output_file.err

I have created an input file with a few sentences on separate lines, with no blank lines. When I run the script, it gets to ### Running Jamr ### and then has an error which I have pasted below:

`Reading weights done Sentence: This is a very short test.

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at edu.cmu.lti.nlp.amr.AMRParser$$anonfun$main$3.apply(AMRParser.scala:358) at edu.cmu.lti.nlp.amr.AMRParser$$anonfun$main$3.apply(AMRParser.scala:211) at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772) at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:108) at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771) at edu.cmu.lti.nlp.amr.AMRParser$.main(AMRParser.scala:211) at edu.cmu.lti.nlp.amr.AMRParser.main(AMRParser.scala)`

summerstay commented 7 years ago

output_file.err.txt

summerstay commented 7 years ago

It turns out this was caused by an earlier error in the tokenizer, caused by a problem with converting some foreign language numerals in quote-norm.pl. I removed the offending line in quote-norm.pl and it fixed the problem.

jinruiyang commented 4 years ago

Is the line 146-150? I removed them but don't work.