dhfbk / tint

The Italian NLP Tool
http://tint.fbk.eu
GNU General Public License v3.0
70 stars 9 forks source link

NullPointerException caused by combination of colon, newline and TAB #27

Closed ghost closed 6 years ago

ghost commented 6 years ago

The following (possibly not minimal) example causes a NullPointerException (only tested with Tint client).

a: b \<TAB>d

EXECUTION FAILED: null
java.lang.NullPointerException
    at eu.fbk.dkm.pikes.depparseannotation.StanfordToConllDepsAnnotator.annotate(StanfordToConllDepsAnnotator.java:51)
    at edu.stanford.nlp.pipeline.AnnotationPipeline.annotate(AnnotationPipeline.java:76)
    at edu.stanford.nlp.pipeline.StanfordCoreNLP.annotate(StanfordCoreNLP.java:599)
    at eu.fbk.dh.tint.runner.TintPipeline.runRaw(TintPipeline.java:119)
    at eu.fbk.dh.tint.runner.TintPipeline.run(TintPipeline.java:128)
    at eu.fbk.dh.tint.runner.TintPipeline.run(TintPipeline.java:179)
    at eu.fbk.dh.tint.runner.TintRunner.main(TintRunner.java:124)
ziorufus commented 6 years ago

I've tried with the last version of Tint (recompiled from the develop branch) and it works.

String text = "a: b\n\td";
Annotation annotation = pipeline.runRaw(text);
String json = JSONOutputter.jsonPrint(annotation);
System.out.println(json);

Is the text correct that way? Can you try from the develop branch, too?

ghost commented 6 years ago

In this case too, only the stable version appears to be affected. Sorry, forgot to check that!

ziorufus commented 6 years ago

No problem, the stable version should be... stable. And it is not. We'll release a new version soon.

Thank you for your messages.