I am trying to run the EnglishSentenceDetectorME and am always getting a NullPointerException.
I am using the command line from the javadocs:
java opennlp.grok.preprocess.sentdetect.EnglishSentenceDetectorME "First sentence. Second sentence? Here is another one. And so on and so forth - you get the idea."
This always results in the following stack trace:
Exception in thread "main" java.lang.NullPointerException
at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:66)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:56)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68)
at opennlp.grok.preprocess.sentdetect.EnglishSentenceDetectorME.getModel(EnglishSentenceDetectorME.java:47)
at opennlp.grok.preprocess.sentdetect.EnglishSentenceDetectorME.<init>(EnglishSentenceDetectorME.java:42)
at opennlp.grok.preprocess.sentdetect.EnglishSentenceDetectorME.main(EnglishSentenceDetectorME.java:61)
Does anyone know what could be wrong? I would really appreciate some help and am excited to begin using this software.
Thanks,
J.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to run the EnglishSentenceDetectorME and am always getting a NullPointerException.
I am using the command line from the javadocs:
java opennlp.grok.preprocess.sentdetect.EnglishSentenceDetectorME "First sentence. Second sentence? Here is another one. And so on and so forth - you get the idea."
This always results in the following stack trace:
Exception in thread "main" java.lang.NullPointerException
at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:66)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:56)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68)
at opennlp.grok.preprocess.sentdetect.EnglishSentenceDetectorME.getModel(EnglishSentenceDetectorME.java:47)
at opennlp.grok.preprocess.sentdetect.EnglishSentenceDetectorME.<init>(EnglishSentenceDetectorME.java:42)
at opennlp.grok.preprocess.sentdetect.EnglishSentenceDetectorME.main(EnglishSentenceDetectorME.java:61)
Does anyone know what could be wrong? I would really appreciate some help and am excited to begin using this software.
Thanks,
J.
Looks like the maxent models aren't in your classpath. Make sure that you have ${GROK_HOME}/src/java in your classpath, and it should work out.
Having said that, you should check out the code in opennlp.sentdetect, where this package is currently being maintained. See:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/opennlp/opennlp/src/java/opennlp/sentdetect/
Sorry to have taken so long to respond --- seem to have missed your message since I haven't been monitoring the forums closely lately.
Jason