GithubHelp home page GithubHelp logo

File not found about pyocr HOT 5 CLOSED

tangb avatar tangb commented on May 29, 2024
File not found

from pyocr.

Comments (5)

jflesch avatar jflesch commented on May 29, 2024

Since it generated a output.txt instead of a output.hocr or output.html, my guess would be that you're missing the configuration file hocr (/usr/share/tesseract-ocr/tessdata/configs/hocr with Tesseract 3.05 in Debian). If so, it shouldn't have been silenced however.

from pyocr.

tangb avatar tangb commented on May 29, 2024

I compiled tesseract on my own and I got a hocr file in /usr/local/share/tessdata/configs/hocr
I got this output with --print-parameters command option:

tesseract --print-parameters | grep hocr
hocr_font_info 0 Add font info to hocr output
tessedit_create_hocr 0 Write .html hOCR output file

0 means disabled ?
Is there a way to make sure tesseract uses the hocr specified above?

Thank you for your help

from pyocr.

jflesch avatar jflesch commented on May 29, 2024

0 = disabled. But this is to be expected since you didn't specify to Tesseract that it must use the hocr configuration file.

% tesseract --print-parameters | grep hocr
hocr_font_info	0	Add font info to hocr output
tessedit_create_hocr	0	Write .html hOCR output file

% tesseract --print-parameters randomfile.jpeg randomoutputfile hocr | grep hocr
hocr_font_info	0	Add font info to hocr output
tessedit_create_hocr	1	Write .html hOCR output file

What is the content of your /usr/local/share/tessdata/configs/hocr ?

from pyocr.

tangb avatar tangb commented on May 29, 2024

I rebuild completely tesseract with latest version and I got no problem.
It seems it was an issue with my tessdata path, files were installed in different place...

Thank you for your help ;-)

from pyocr.

jflesch avatar jflesch commented on May 29, 2024

You're welcome

from pyocr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.