tberg12 / ocular

Ocular is a state-of-the-art historical OCR system.
GNU General Public License v3.0
250 stars 48 forks source link

NullPointerException when writing language model #5

Closed matjemeisje closed 8 years ago

matjemeisje commented 8 years ago

Hi,

I am using the precompiled jar to train a language model for Dutch. However, it fails to write the lm:

writing LM to dut.lmser Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.simontuffs.onejar.Boot.run(Boot.java:340) at com.simontuffs.onejar.Boot.main(Boot.java:166) Caused by: java.lang.RuntimeException: java.lang.NullPointerException at edu.berkeley.cs.nlp.ocular.main.InitializeLanguageModel.writeLM(InitializeLanguageModel.java:314) at edu.berkeley.cs.nlp.ocular.main.InitializeLanguageModel.run(InitializeLanguageModel.java:121) at edu.berkeley.cs.nlp.ocular.main.OcularRunnable.doMain(OcularRunnable.java:23) at edu.berkeley.cs.nlp.ocular.main.InitializeLanguageModel.main(InitializeLanguageModel.java:85) ... 6 more Caused by: java.lang.NullPointerException at edu.berkeley.cs.nlp.ocular.main.InitializeLanguageModel.writeLM(InitializeLanguageModel.java:310) ... 9 more

Best, Matje

matjemeisje commented 8 years ago

Just tested by building ocular myself, but this gives the same error.

dhgarrette commented 8 years ago

Give it a shot now and let me know if you still have issues.

matjemeisje commented 8 years ago

Finally got around to testing it. Works like a charm! Thank you for the quick response.