Tesseract OCR Tutorial for iOS | raywenderlich.com

This tutorial is super helpful.
However, I found a problem when I tried to add another language. Basically what I did were:

  1. put nld.traineddata on my tessdata folder
  2. changed part of the code into if let tesseract = G8Tesseract(language: “eng+nld”)
  3. built the app (there was no error)
  4. started scanning from gallery. This was when the error happened and I got this message unable to read cube language model params from /Users/Library/Developer/CoreSimulator/Devices/2EC771F3-8576-4998-8AC0-3F3B329E11B0/data/Containers/Bundle/Application/05A8FA41-7D3F-4E68-B5CF-5EACDC8BC978/Love In A Snap.app/tessdata/nld.cube.lm

Can you help me to solve this problem? :blush:

1 Like

Running on IOS 13.2.3 on 6s Plus - allows me to take photo - select use photo but nothing appears in the view and no photo has been added to roll ? Any thoughts

Any ideas - anyone else actually tried this on IOS 13?

@lyndsey Can you please help with this when you get a chance? Thank you - much appreciated! :]

Have you fixed this issue? I also getting same error.

Sounds like an issue with your file. Here’s a Stackoverflow answer that seems to address this: ocr - unable to open Cube language model params for hindi Language in tesseract - Stack Overflow

I fixed this error by installing the correct versions of the below files:

hin.cube.bigrams
hin.cube.fold
hin.cube.lm
hin.cube.nn
hin.cube.params
hin.cube.word-freq
hin.tesseract_cube.nn
Along with the correct versions of the Hindi AND English training data.

All above files are available at: https://github.com/tesseract-ocr/tesseract/wiki/Data-Files#data-files-for-version-304305

I put these files under: /usr/local/share/tessdata

This is on CentOS 7.2

HI!

It works only if the image is transformed into a binary one. Do you have any idea why? Thx!

@lyndsey Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hello! I am getting an error when starting the product. When importing the library, I am told “No such module ‘TesseractOCR’”.

Possibly they changed the name? Please help me out! :slight_smile:

Hey! I am getting the same error! Please let me know if you have solved this issue!!

s the terminal output instructs, “Please close any current Xcode sessions and use Love In A Snap.xcworkspace for this project from now on.” Open Love In A Snap.xcworkspace in Xcode .

you are open the project file, when you should be opening the workspace in Xcode

@jorgejaden Do you still have issues with this?

@mrmezzanotte Thank you for sharing this - much appreciated!

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!