Actually, that doesn't answer my question. It only says where tesseract
stores the .traineddata file after download and not how to set the
langPath. I tried to set the langPath like this:
const worker = new TesseractWorker({
corePath: '../../node_modules/tesseract.js-core/tesseract-core.wasm.js',
langPath: lang_path
});
worker.recognize(file,
'cus'
)
.progress(function(packet){
console.info(packet)
progressUpdate(packet)
})
.then(function(data){
console.log(data)
progressUpdate({ status: 'done', data: data })
})
but I get errors:
* Error opening data file ./cus.traineddata
* Please make sure the TESSDATA_PREFIX environment variable is set to your
"tessdata" directory.
Thanks for anything...
--
You received this message because you are subscribed to the Google Groups
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tesseract-ocr/9c3a32f2-2d0b-4a4d-b8e6-b012487a0282%40googlegroups.com.