Link to home
Start Free TrialLog in
Avatar of Marco Gasi
Marco GasiFlag for Spain

asked on

Tesseract.js error

Hi everybody.
I'm working a mobile app with Cordova (always the same :)). Now i have to implement some OCR function and I found tesseract.js script.

As often it happens, at least to me, reading docs everything looks to be easy but I've just included tesseract.js in my test app (built just to exepriment this plugin) and I get this error:
Uncaught TypeError: Object function Object() { [native code] } has no method 'assign' 

Open in new window


This is my directory tree:
root
-- css
-- img
-- js
  -- index.js
  -- jquery-2.1.4.min.js
  -- tesseract.js
  -- worker.js

Open in new window


This s the related head section of my index.html:
        <script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
        <script type="text/javascript" src="js/worker.js"></script>
        <script type="text/javascript" src="js/tesseract.js"></script>
        <script type="text/javascript" src="cordova.js"></script>
        <script type="text/javascript" src="js/index.js"></script>		
        <title>Hello OCR</title>

Open in new window


I see many other get it work and I'm wondering what I'm doing wrong....
As usual, any help will be deeply appreciated.

Cheers
ASKER CERTIFIED SOLUTION
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Marco Gasi

ASKER

Loading library from CDN works fine and I realized that it doesn't make sense to load it localyy because language pack must anyway loaded from CDN so an active Internet connection is needed.