I am trying to integrate Tesseract in android. So I have to initialize the tesseract with trained data by calling baseApi.init(DATA_PATH, lang). DATA_PATH is the path of traineddata.lang file which is to be put in assests folder then in tessdata folder in String format.But I am not able to find a way to do this and getting this error repeatedly.
02-20 19:26:17.574: W/dalvikvm(4427): threadid=1: thread exiting with uncaught exception (group=0x41cf9da0)
02-20 19:26:17.584: E/AndroidRuntime(4427): FATAL EXCEPTION: main
02-20 19:26:17.584: E/AndroidRuntime(4427): Process: com.example.helloworld, PID: 4427
02-20 19:26:17.584: >E/AndroidRuntime(4427): java.lang.IllegalArgumentException: Data path must contain subfolder tessdata!
02-20 19:26:17.584: >E/AndroidRuntime(4427): at com.googlecode.tesseract.android.TessBaseAPI.init(TessBaseAPI.java:283)
I have already used these and not able to proceed further.
- String DATA_PATH = "file:///assets/tessdata/eng.traineddata";
- String DATA_PATH = "file://android_assest/tessdata/eng.traineddata";
also using both with URI also.