Search code examples
javatesseracttess4j

How to access multiple .traineddata files in Tess4j?


I am using Tess4j with java and I need to access more than one .traineddata files at a time. I have trained the tesseract to create my own .traineddata files and I have kept them along with default .traineddata file which comes with Tess4j package. By default eng.traineddata file is accessed while performing OCR. How can I access multiple .traineddata files at a time with Tess4j?


Solution

  • You can specify combinations, such as:

    instance.setLanguage("eng+spa");
    

    See documentation.