2

I found a strange issue like even If I explicitly mention the datapath to be /data/local/tmp/tesseract/, the TessBaseAPI uses the tessdata inside /data/data/tesseract/ (Only if it exists). If tesseract directory does not exist inside /data/data folder then the given path is taken.

I almost searched the entire TessBaseAPI.java file, but I couldn't find the default path.

Following are the code:

String TESSBASE_PATH = "/data/local/tmp/tesseract/";
TessBaseAPI baseApi = new TessBaseAPI();
baseApi.init(TESSBASE_PATH, "eng");

Can you please let me know from where the default datapath is taken?

Nagaraja Thangavelu
  • 1,168
  • 1
  • 15
  • 31

1 Answers1

2

There's no "default" data path. Only the path supplied to the init() method is used. Check out the code for the init() method--you'll see where the API throws an IllegalArgumentException if the data file is not in the specified location.

rmtheis
  • 5,992
  • 12
  • 61
  • 78