Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed loading language 'eng' while trying Tesseract.js #194

Closed
jSquaredSolutions opened this issue Mar 15, 2018 · 5 comments

Comments

@jSquaredSolutions
Copy link

commented Mar 15, 2018

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

/* Im using the above code to try tesseract. However, when I run the nodejs script from my bash shell in Windows I get the following:
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'

@jinhwanee93

This comment has been minimized.

Copy link

commented Mar 21, 2018

I had this issue before; try replacing your old eng.traineddate file

download a new eng.traineddata file here:
https://github.com/tesseract-ocr/tesseract/wiki/Data-Files

or here:
https://github.com/tesseract-ocr/tessdata

Hope this helps

@user883311

This comment has been minimized.

Copy link

commented Apr 25, 2018

@jinhwanee93 Thank you - this solved it for me:

@BATspock

This comment has been minimized.

Copy link

commented Jul 11, 2018

@jinhwanee93 Thanks, this worked for me as well

@danielsnider

This comment has been minimized.

Copy link

commented Dec 29, 2018

BTW, the traineddata file that finally worked for me is from:
https://github.com/tesseract-ocr/tessdata/blob/master/eng.traineddata

On Ubuntu 16.04 I put it here /usr/share/tesseract-ocr/4.00/tessdata/eng.traineddata.

This fixes the error:

Failed loading language 'eng'
Tesseract couldn't load any languages!
Could not initialize tesseract.
@jeromewu

This comment has been minimized.

Copy link
Member

commented May 18, 2019

Close as resolved.

@jeromewu jeromewu closed this May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.