peteanderson80 / SPICE

Semantic Propositional Image Caption Evaluation
http://panderson.me/spice
GNU Affero General Public License v3.0
132 stars 31 forks source link

Error when running SpiceParser #6

Open jonbakerfish opened 6 years ago

jonbakerfish commented 6 years ago

I'm able to run the main function in SpiceParser, but whenever I input a sentence, I always got the following errors:

Exception in thread "main" java.lang.ExceptionInInitializerError
    at edu.anu.spice.SpiceParser.parseAnnotation(SpiceParser.java:327)
    at edu.anu.spice.SpiceParser.generateTuples(SpiceParser.java:234)
    at edu.anu.spice.SpiceParser.loadTuples(SpiceParser.java:243)
    at edu.anu.spice.SpiceParser.parseCaptions(SpiceParser.java:274)
    at edu.anu.spice.SpiceParser.main(SpiceParser.java:494)
Caused by: java.lang.IllegalArgumentException: There is already a relation named det:qmod!
    at edu.stanford.nlp.trees.GrammaticalRelation.<init>(GrammaticalRelation.java:321)
    at edu.stanford.nlp.trees.GrammaticalRelation.<init>(GrammaticalRelation.java:348)
    at edu.stanford.nlp.scenegraph.SemanticGraphEnhancer.<clinit>(SemanticGraphEnhancer.java:48)
    ... 5 more

Why is that?

BTW, there's no toJSON method in the SceneGraph class compared to the one in Stanford Scene Graph Parser. Is there any other way to save the graph (format that can be handled by python)?

buraksatar commented 4 years ago

Hi @jonbakerfish , Did you solve this problem later on? I've also got this problem while I was trying to use Stanford Scene Graph Parser.

bigbrother001 commented 2 years ago

Excuse me, Did you solve the problem? I got this ERROR too. @buraksatar @jonbakerfish