jonathanpalma / react-native-tesseract-ocr

Tesseract OCR wrapper for React Native
MIT License
558 stars 172 forks source link

Example doesn't work #120

Closed fair-man closed 2 years ago

fair-man commented 2 years ago

I am trying to run an example https://github.com/jonathanpalma/react-native-tesseract-ocr/blob/master/example/App.js but cant do it

steps to reproduce:

  1. Create a new project with npm npx react-native init testproject
  2. Install react-native-tesseract-ocr library and link dependencies npm i react-native-tesseract-ocr --save react-native link react-native-tesseract-ocr
  3. Copy from https://github.com/jonathanpalma/react-native-tesseract-ocr/blob/master/example/App.js and paste to testproject/App.js
  4. Install dependencies and run project npm i && npm run android
  5. Run example in android emulator.

Actual result: [Error: java.io.IOException: Could not create directory]

Screenshot_2
fair-man commented 2 years ago

https://github.com/jonathanpalma/react-native-tesseract-ocr/issues/86 https://github.com/jonathanpalma/react-native-tesseract-ocr/issues/89

Doesn't help solve the problem.

manishbss-sdei commented 2 years ago

@fair-man did you add the eng.traineddata file in your project?

fair-man commented 2 years ago

@fair-man did you add the eng.traineddata file in your project?

No, I didn't. Where can I get the eng.traineddata file and where should I put it in my project?

najeeb2113 commented 2 years ago

kept the trained data in specified directory still files doesnt work coud not create directory

saurabh-nandan commented 2 years ago

I am also getting the same error. Could you please provide eng.traineddata file, it's not there in the project.

Ajayg96 commented 2 years ago

react-native-tesseract-ocr uses tess-two library for Android which is no longer maintained. If you still want to use it you can find trained data files here

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.