Change language in Java

  • 44 Views
  • Last Post 2 weeks ago
Azad Abad posted this 2 weeks ago

I am trying to write a simple java application to change the language in Fine Reader OCR. I cannot find any sample code or useful information in the documentation to do it. Can anybody provide me a sample code to switch the language from English to German before OCR a document ( In Java, not C) ?

 

Thanks in advance

Best

Azad

Koen de Leijer posted this 2 weeks ago

Hi

This question has been asked before,
see: https://forum.ocrsdk.com/thread/arabic-text-recognition/

It should work with just this one-liner:

engine.CreateRecognizerParams().SetPredefinedTextLanguage("German");
or
engine.CreateRecognizerParams().SetPredefinedTextLanguage("GermanNewSpelling");
or
engine.CreateRecognizerParams().SetPredefinedTextLanguage("GermanLuxembourg");

Edit (2018-01-15)
An other solution is to add the properties to the IDocumentProcessingParams-object

            IDocumentProcessingParams dpp = engine.CreateDocumentProcessingParams();   
            dpp.getPageProcessingParams().getRecognizerParams().SetPredefinedTextLanguage(language);

What have you tried so far?

Regards
Koen de Leijer

PS. see one of my other Java-samples here: https://forum.ocrsdk.com/thread/finereader-engine-java-api/

Close