tberg12 / ocular

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

Error: Could not find or load main class .main.class=edu.berkeley.cs.nlp.ocular.main.InitializeLanguageModel #16

Open BlueSkyLT opened 2 years ago

BlueSkyLT commented 2 years ago

Hello, I am trying to train an OCR model for some WW2 documents. I have no previous experience with Java. When I try to set up and run the program I encounter this error when initializing a language model for English. Does anyone know what is happening?

PS F:\ocr\ocular>   java -Done-jar.main.class=edu.berkeley.cs.nlp.ocular.main.InitializeLanguageModel -mx7g -jar ocular-0.3-SNAPSHOT-with_dependencies.jar \
>>     -inputTextPath mytext.txt \
>>     -outputLmPath lm/english.lmser
>>
Error: Could not find or load main class .main.class=edu.berkeley.cs.nlp.ocular.main.InitializeLanguageModel
-inputTextPath : The term '-inputTextPath' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:2 char:5
+     -inputTextPath mytext.txt \
+     ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (-inputTextPath:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

-outputLmPath : The term '-outputLmPath' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:3 char:5
+     -outputLmPath lm/english.lmser
+     ~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (-outputLmPath:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
taineleau commented 1 year ago

I think the inputTextPath should be a folder instead of the filename.