Intuitively I know it answers my question but I fail to see the answer.
Here's what went through my mind as I read your link: "I think a gitpod is
a node.js server so that means the file shuld be in the fs where the
command was executed. The command got executed in the demo.html file which
is located in the browser directory but there is no .traineddata in that
folder. maybe the command got executed in the /dist directory because at
the beginning of the script we included the following
<script src="/dist/tesseract.dev.js"></script>
but if so I don't see the directory in the project..."
it's about here where I get lost. I now think maybe I should declare the
langPath but this I did and I already told you what happens...
guys help me out here because after I get this right I still need to work
on my .traineddata file itself. It's working but it's limited. I just made
it to get started...
Thanks already :-)
On Wednesday, September 4, 2019 at 6:54:39 PM UTC+2, Clint William Theron
wrote:
>
> 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/226d7854-fe05-4e0b-84a9-a4f8184f6017%40googlegroups.com.