[1.0.1] text, OCR, tesseract not working --- tessdata folder not found

Created by RaiMan on on 2013-09-24
Last updated by:
RaiMan on on 2014-05-09

You get the following error, after having successfully setup with option 5 (Tesseract support) and switched on the Settings options for text and/or OCR (see below):

[error] TextRecognizer: init: tessdata folder not found at <path-to-Sikuli-stuff>/libs/
[error] Region.find(text): text search is now switched off

To overcome this problem:
- delete the libs folder mentioned in the error message
- run again, whatever you did before to get the above error
- the libs folder should be recreated and now contain the tessdata folder

This workaround should be done once after a setup with option 5 (... and is a bug, that will soon be fixed)

How to switch it on at runtime:
TextSearch (find("some text")) and OCR (Region.text()) are currently switched off in the default with respect to the many issues.

The related Settings options to be used (set to true) with Sikuli API (or outside the IDE):

Settings.OcrTextRead = true; // to switch on the Region.text() function

Settings.OcrTextSearch = true; // to switch on finding text with find("some text")

Running scripts from inside the IDE alternatively the respective options in the Preferences -> …more options can be selected.