Have a look at:
https://github.com/GautamGupta/Simple-Android-OCR/blob/master/src/com/datumdroid/android/ocr/simple/SimpleAndroidOCRActivity.java

They use the getExternalStorageDirectory Android function. It stores the
data on the common storage, but you can try to use "getFilesDir":
http://developer.android.com/reference/android/content/Context.html#getFilesDir()

I'm not sure the NDK Tesseract project will have access to this storage
that is linked to the application, but it should.

Keep us informed



2012/9/12 Napalm <[email protected]>

> I'm using tesseract for android and dont know how to include trainned data
> languages in to my application. I'm seeing that most people use static path
> to the tessdata. The code below show this:
>
> TessBaseAPI ocrManager = new TessBaseAPI();
> if(!ocrManager.init("/mnt/sdcard/", "eng")){
>  Log.e(TAG, "Error on tesseract...");
> }
>
> It's not good because if I install my app in another device must copy
> manually the trained language to the /mnt/sdcard/tessdata/.
>
> Another approach is to include language data to the app AssetManager. But
> if not mistaken its not possible to gets path from AssetManager. A
> workaround is to copy trained language to an statical path that i showed in
> code above. Again it's bad because app generates files outside your memory
> space.
>
> It's possible to include somehow the trained data in my app and use it in
> tesseract initialization without any workaround(statical path or copy to
> statical path)?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "tesseract-ocr" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/tesseract-ocr?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en

Reply via email to