You can name your custom traineddata file with a different name eg.
mycustom.traineddata, copy the file to your tessdata folder (referred by
tessdata_prefix) and then use 'mycustom' instead of 'eng' in your program.

On Sat, 24 Aug 2019, 09:13 Clint William Theron, <
[email protected]> wrote:

> Hi. I have a web-app and I'm using the Tesseract CDN like so:
>
> <script src="
> https://unpkg.com/[email protected]/dist/tesseract.min.js";
> ></script>
>
>
> I then try to add the path to my own created traineddata language like so:
>
> const worker = new TesseractWorker({
>     langPath: '
> https://lottoticketscanner.iclips.co.za/assets/tesseract/langs-folder/',
> });
>
> and finally I call the recognize method like so:
>
> worker.recognize(canvas.toDataURL('image/png'), 'eng')
>                         .progress(progress => console.log('progress',
> progress))
>                         .then(result => console.log('result', result.text
> ))
>                         .finally(() => worker.terminate());
>
> This doesn't seem to be using my language (that I created myself). I get
> the same output as I do when I remove the langPath. I mean I can cleary see
> my language is not being used in the recognized process. I know it's not
> because I tested my language (traineddata) in windows desktop and I get the
> results that I actually want. What needs to change in my code so my
> (custom) traineddata, and only mine, is being  used?
>
> Thanks.
>
> --
> 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/8a823afb-fde5-43aa-a643-2cf69462c2f6%40googlegroups.com
> <https://groups.google.com/d/msgid/tesseract-ocr/8a823afb-fde5-43aa-a643-2cf69462c2f6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAG2NduU35m3-_mbUW%3DnP4Z-1ckEbAGefNPyFcUuuyHSi4y5mGA%40mail.gmail.com.

Reply via email to