var Tesseract = require("tesseract.js");
Tesseract.recognize('5421482431.jpg')
.progress(function (p) { console.log('progress', p) })
.then(function (result) { console.log('result', result) })
我试图用Tesseract做一个简单的概念验证。但是,当我尝试通过Windows 10中的Node在Git bash shell中运行此代码时出现错误。
/ ********************************************** ******** /
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'**