Tesseract.js error Langpath location

Asked

Viewed 101 times

1

Good guys. I have this mistake :

Adaptedtemplates != NULL:Error:Assert failed:in file .. /Classify/adaptmatch.cpp, line 190 index.js:8 Uncaught abort() at Error At na (https://c Dn. rawgit.com/naptha/Tesseract.js-core/0.1.0/index.js:36:26) At object.ka [as abort] (https:/ /c Dn. rawgit.com/naptha/Tesseract.js-core/0.1.0/index.js:511:108) at _abort (h ttps://Cdn.rawgit.com/naptha/Tesseract.js-core/0.1.0/index.js:377:173) at $L (h ttps://Cdn.rawgit.com/naptha/Tesseract.js-core/0.1.0/index.js:387:55709) at jpa (h ttps://Cdn.rawgit.com/naptha/Tesseract.js-core/0.1.0/index.js:392:22274) at lt (h ttps://Cdn.rawgit.com/naptha/Tesseract.js-core/0.1.0/index.js:391:80568) at Mt (h ttps://Cdn.rawgit.com/naptha/Tesseract.js-core/0.1.0/index.js:391:80700) At array.BS (h ttps://Cdn.rawgit.com/naptha/Tesseract.js-core/0.1.0/index.js:391:69011) at bp (h ttps://Cdn.rawgit.com/naptha/Tesseract.js-core/0.1.0/index.js:387:110121) at jt (h ttps://Cdn.rawgit.com/naptha/Tesseract.js-core/0.1.0/index.js:391:80280) If this abort() is Unexpected, build with -s ASSERTIONS=1 which can Give more information.

I am creating langPath and applying it as follows.

window.Tesseract = Tesseract.create({          
            langPath: '/app/modules/teste/tessdata/'
        })



    Tesseract.recognize(file, {
        lang: 'Inconsolata',
                tessedit_char_whitelist: '0123456789',
                langPath : '/app/modules/teste/tessdata/'

    })
        .progress(function(packet){
            console.info(packet)
                        console.log('é aqui? ^');
            progressUpdate(packet)

        })
        .then(function(data){
            console.log(data)
                        console.log('ou aqui aqui? ^')
            progressUpdate({ status: 'done', data: data })
        });

The folder is with permission. I don’t know what might be wrong Someone ?

  • 1

    Ben coming to Stack Overflow, please specify better what you are doing, share part of your code that causes the error.. abs.

  • I changed the question there see if you can help me

1 answer

0

Based on that Issue and a little I know of this tool:

1- In your project you are already creating the file Eng.traineddata, so every time you have your code executed it automatically identifies where this file is. And you’re changing his route, so maybe he clashes with the files.

2- Check your code if you are calling Eng.traineddata and if you have that file within your project. Without this file the Tesseract it will not be a "language". In this wiki you can find the list of all languages accepted by the Tesseract, and here you will get the files . traineddata with the accepted languages.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.