Reputation: 2409
I am using Tesseract's Java wrapper Tess4J in a Java project in order to get OCR of images which are in Turkish. This project has web methods which are called from a client. My question is: Where should I put Turkish language data file? Does Tesseract work if I put the tur.traineddata file somewhere in my project's folders? Or do I have to install the tesseract to the server machine and put tur.traineddata under tessdata folder?
Upvotes: 1
Views: 3999
Reputation: 21
There is a method in Tesseract class setDatapath(String path) you can call this method to tell Tesseract enging where to look for language file to perform ocr for example suppose your tessdata folder is in D:\My_Language_Files folder then you have to pass "D:\My_Language_Files" string in setDatapath() method for example
Tesseract instance = Tesseract.getInstance();
instance.setDatapath("D:\My_Language_Files");
instance.setLanguage("eng");
Upvotes: 2
Reputation: 8345
You can put the language data file anywhere. Be sure to specify its location in the Init
method or set TESSDATA_PREFIX
environment variable for it.
Upvotes: 1