Open rsenerol opened 5 years ago
Seems like this issue was already opened here https://github.com/gali8/Tesseract-OCR-iOS/issues/394
I’m also having this problem. Does this fix work? The tests above failed?
I find that until this fix can be merged into the main branch, an easier workaround is to initialize with language = "", then immediately afterwards, set the language to what you want it to be.
When using the initializer
initWithLanguage:configDictionary:configFileNames:absoluteDataPath: engineMode:)
the propertyabsoluteDataPath
was not properly set, with the value passed as param, before configuring the engine. This would raise/print the error "ERROR! Can't init Tesseract engine." and not find the tessdata folder.The fix makes sure that the property
absoluteDataPath
is correctly set with the value passed in the init and not the default value (main bundle).