Giter Club home page Giter Club logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
One thing I left to mention is that the IOException comes out where 
in.read(bytes);..And the Exception will not occur when I use an image file in 
the place of eng.traineddata file and everything runs OK.

Original comment by [email protected] on 24 Oct 2012 at 8:08

from tesseract-android-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
what's the packageResource in sentence:
InputStream in=packageResource.getAssets().open(DEFAULT_LANG+".traineddata");

I tried with
 InputStream in=getAssets().open(DEFAULT_LANG+".traineddata");
and it turns out alright.

Original comment by [email protected] on 24 Oct 2012 at 9:27

from tesseract-android-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
  I put all the above codes into only one function in a separate class so that I have to pass Resources() object (here packageResource) from main Activity() class into the function.... I've tried both with getResources().getAssets().open(DEFAULT_LANG+".traineddata"); and getResources().openRawResource(R.id.eng);. ...Both of them gave the same IOException() on calling the in.read(bytes) function.

Original comment by [email protected] on 25 Oct 2012 at 9:24

from tesseract-android-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
[deleted comment]

from tesseract-android-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
I've decided to put the "eng.trainedata" file bytes into an array of C++ file 
and embed into the compiled library file.But the file size is more than 3MB.I 
haven't tested but I'm worried about the performance issue.Any ideas please 
help!

Original comment by [email protected] on 30 Oct 2012 at 9:39

from tesseract-android-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
You need to put your traineddata file in "asset/tessdata". Looks like thats 
where you are trying to copy from.

1. I put the latest eng.traineddata file in the android "asset" folder
2. This is the code for copying the traineddata file from the "asset" folder to 
the sd-card. 

        File tessdata=new File(DEFAULT_DATA_PATH+"tessdata/"+DEFAULT_LANG+".traineddata");

Original comment by [email protected] on 19 Nov 2012 at 6:39

from tesseract-android-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.