tberg12 / ocular

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

InitializeFont gives NullPointerException #3

Closed jbingel closed 8 years ago

jbingel commented 8 years ago

I managed to train a language model, but get a NPE when trying to initialize the font model (step 2). I use the self-contained Jar (0.3-SNAPSHOT, downloaded 2 May 2016).

Error stacktrace is attached. npe.txt

juancobo commented 8 years ago

I had the same problem, both when I used the jar supplied and also when building the jar from scratch. I was able to resolve it by changing the function declaration in line 57 of src/main/java/edu/berkeley/cs/nlp/ocular/main/InitializeFont.java to public static void main(String[] args) { and rebuilding the jar.

I'm not sure whether this was the best thing to do, but it seems to work.

dhgarrette commented 8 years ago

This should be fixed now:

https://github.com/tberg12/ocular/blob/5d4d977208713c2504909a30136cb7ea3f2801ee/src/main/java/edu/berkeley/cs/nlp/ocular/main/InitializeFont.java#L57