I'm using Sun JDK 1.3.1, and when I try to start
the sample with
java opennlp.grok.Grokling simple.gram
this is the output I get:
Loading grammar at URL: file:/home/torben/ai/grok/Grok/samples/grammar/simple.gram
Loading Lex... Rules... Pipeline...
Error in creating Pipeline:
java.lang.NullPointerException
Exception in thread "main" java.lang.NullPointerException
at opennlp.common.Pipeline.verify(Pipeline.java:66)
at opennlp.common.Pipeline.<init>(Pipeline.java:59)
at opennlp.grok.Grokling.<init>(Grokling.java:84)
at opennlp.grok.Grokling.main(Grokling.java:205)
The same is true for IBM's JDK - so I don't think it's the VM.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is problably a classpath issue. You need to make sure that /home/torben/ai/grok/Grok/src/java is in your classpath, which is so that the maxent models can be found and loaded.
Alternatively, you can get a checkout of the CVS, in which you will find a directory grok/bin with a script called "grokling" in it that will set up your classpath appropriately given that you set the GROK_HOME environment variable (in your case home/torben/ai/grok/). Then you can run it by calling:
I'm using Sun JDK 1.3.1, and when I try to start
the sample with
java opennlp.grok.Grokling simple.gram
this is the output I get:
Loading grammar at URL: file:/home/torben/ai/grok/Grok/samples/grammar/simple.gram
Loading Lex... Rules... Pipeline...
Error in creating Pipeline:
java.lang.NullPointerException
Exception in thread "main" java.lang.NullPointerException
at opennlp.common.Pipeline.verify(Pipeline.java:66)
at opennlp.common.Pipeline.<init>(Pipeline.java:59)
at opennlp.grok.Grokling.<init>(Grokling.java:84)
at opennlp.grok.Grokling.main(Grokling.java:205)
The same is true for IBM's JDK - so I don't think it's the VM.
This is problably a classpath issue. You need to make sure that /home/torben/ai/grok/Grok/src/java is in your classpath, which is so that the maxent models can be found and loaded.
Alternatively, you can get a checkout of the CVS, in which you will find a directory grok/bin with a script called "grokling" in it that will set up your classpath appropriately given that you set the GROK_HOME environment variable (in your case home/torben/ai/grok/). Then you can run it by calling:
> /home/torben/ai/grok/Grok/bin/grokling simple.gram
Or just
> grokling simple.gram
if GROK_HOME/bin is in your path.
Thank you, including the src/java path worked.
I had the same problem with tk22222, but adding the src/java in my classpath didn't work.
I builded grok from scratch and after that all seems to work properly. Does this seem resonable ?