Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add english OCR training data #292

Merged
merged 1 commit into from
Oct 19, 2023
Merged

Add english OCR training data #292

merged 1 commit into from
Oct 19, 2023

Conversation

joecorall
Copy link
Contributor

@joecorall joecorall commented Oct 19, 2023

Closes Islandora-Devops/isle-dc#298 and Islandora/Crayfish#176

See Islandora/Crayfish#176 for a detail on the issues related to this.

To troubleshoot, I docker exec'd into the hypercube container and tried running tesseract manually, which yielded the proper error

curl https://islandora.traefik.me/_flysystem/fedora/2023-10/jpeg-2000.jp2 | tesseract stdin stdout -c tessedit_create_hocr=1 -c hocr_font_info=0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  Error opening data file /usr/share/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
Could not initialize tesseract.
  0 13.6M    0 14044    0     0  39346      0  0:06:04 --:--:--  0:06:04 39449
curl: (23) Failure writing output to destination

After getting /usr/share/tessdata/eng.traineddata in place (which this PR does) OCR and hOCR works for TIFF and JP2 files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tesseract in Hypercube does not support JP2 files
2 participants