1
var Tesseract = require("tesseract.js");
Tesseract.recognize('5421482431.jpg')
.progress(function  (p) { console.log('progress', p)    })
.then(function (result) { console.log('result', result) })

I'm trying to do a simple proof of concept with Tesseract. However, I get an error when trying to run this code in the Git bash shell via Node in Windows 10.

/***************************************************************************/

progress { status: 'loading tesseract core' }
progress { status: 'loaded tesseract core' }
progress { status: 'initializing tesseract', progress: 0 }
pre-main prep time: 51 ms
progress { status: 'initializing tesseract', progress: 1 }
progress { status: 'loading eng.traineddata', progress: 0 }
progress { status: 'loading eng.traineddata', progress: 1 }
progress { status: 'initializing api', progress: 0 }
**Failed loading language 'eng'**
  • did you see [https://stackoverflow.com/questions/14800730/tesseract-running-error](https://stackoverflow.com/questions/14800730/tesseract-running-error)? – Andra Mar 15 '18 at 16:34
  • If you look in tessdata folder, do you have an eng.traineddata file? I just did a clean download to look around, and my fresh install does not have that file... At least not in the tessdata folder (I haven't looked everywhere, but the below link shows it as tessdata/eng.traineddata) I don't know that this is the only resource to get it, but I found it at https://github.com/tesseract-ocr/tessdata/blob/master/eng.traineddata – Aaron Mar 15 '18 at 16:34
  • 1
    I don't see a tessdata folder! I "npm install tesseract" from the local project folder. Woud the tessdata folder be in the "Node Modules" folder? If so I don't see it there. – Jeffrey McFarland Mar 15 '18 at 19:11

0 Answers0