Skip navigation.
Home
Semantic Software Lab
Concordia University
Montréal, Canada

Problem with MultiPaX 1.3 and merged stanford parser tokens

Printer-friendly versionPrinter-friendly versionPDF versionPDF version

Hello,

Please advise on the following error, if possible:

----------------------------------------------------------------------
extracting stanford PAS!
java.lang.NullPointerException
at info.semanticsoftware.multiPaX.ParserPaX.getString(ParserPaX.java:83)
at info.semanticsoftware.multiPaX.StanfordParserPaX.getPAS(StanfordParserPaX.java:83)
at info.semanticsoftware.multiPaX.MultiPaX.execute(MultiPaX.java:195)
at gate.util.Benchmark.executeWithBenchmarking(Benchmark.java:299)
at gate.creole.SerialController.runComponent(SerialController.java:222)
at gate.creole.SerialController.executeImpl(SerialController.java:153)
at gate.creole.SerialAnalyserController.executeImpl(SerialAnalyserController.java:115)
at gate.creole.AbstractController.execute(AbstractController.java:62)
at gate.util.Benchmark.executeWithBenchmarking(Benchmark.java:299)
at gate.gui.SerialControllerEditor$RunAction$1.run(SerialControllerEditor.java:1552)
at java.lang.Thread.run(Thread.java:619)
----------------------------------------------------------------------

This error occurred while merging two stanford parser annotation sets (AS) into one using majority rule. The resulting AS appears to be fine: has proper Token, Sentence, SyntaxTreeNode and NP annotations. The proper AS is assigned to this third instance of MultiPax (I have two other running on different AS), however, it keeps failing for the above reason. Any insight as to what type of string it is not finding?

Regards...

- Q

Code snippet

This is the code that throws the nullPointerException. I guess there is a problem with the annotation set and/or the annotation id in your setting.

protected String getString(Integer id) {
String ret = "";
Annotation anno = inputAS.get(id);
ret = (String)anno.getFeatures().get("root");
if(ret==null)
ret = (String)anno.getFeatures().get("string");
return ret;
}

If this doesn't help, I would need more information about your pipeline and parameters, e.g. the stored application file in xml-format.

Best,
Ralf

Figured out a hard lesson...

Thank you, Ralf,

I didn't get a notice of reply to my initial msg, but luckily I had figured it out. The problem was the process of merging the annotation sets (AS) after having transfered 'Token' anns from the 'default' AS: GATE gives those new ID's, so merging them can give ID's that are 'out of context', lack of a better way to express it. This was a hard lesson in being creative (and careful) between AS's.

Regards...

- QI