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

trying to upload the image and while generating the hocr format getting this issue #15

Open
guptaaman2011 opened this issue Mar 8, 2018 · 14 comments

Comments

@guptaaman2011
Copy link

python gcv2hocr.py Capture.jpg.json > capture.hocr
Traceback (most recent call last):
File "gcv2hocr.py", line 146, in
page = fromResponse(resp, **args.dict)
File "gcv2hocr.py", line 99, in fromResponse
word.htmlid="word_%d_%d" % (len(page.content) - 1, len(curline.content))
AttributeError: 'NoneType' object has no attribute 'content'
capture

@dinosauria123
Copy link
Owner

Thank you for using gcv2hocr.

please upload your Capture.jpg.json.

How to use makepdf.sh

  1. Go to the same place at makepdf.sh
  2. Execute " sh ./makepdf.sh "

You have to edit makepdf.sh before execute.
In the first line of makepdf.sh "while [ $a -le 32 ]" this says you have page001.jpg to page032.jpg.
You may want to convert different number of jpegs, If you have only one jpeg,
You just edit the first line of makepdf.sh as "while [ $a -le 1 ]"

@guptaaman2011
Copy link
Author

guptaaman2011 commented Mar 8, 2018 via email

@guptaaman2011
Copy link
Author

guptaaman2011 commented Mar 8, 2018 via email

@dinosauria123
Copy link
Owner

This is what you may want ?

https://www.zotero.org/support/dev/translators

@dinosauria123
Copy link
Owner

Or this one ?

https://hub.docker.com/r/ubma/ocr-fileformat/

@guptaaman2011
Copy link
Author

guptaaman2011 commented Mar 8, 2018 via email

@dinosauria123
Copy link
Owner

Do you want to convert images to hocr ?

You may use Tesseract OCR.

https://github.com/tesseract-ocr/tesseract

@dinosauria123
Copy link
Owner

@guptaaman2011
Copy link
Author

guptaaman2011 commented Mar 8, 2018 via email

@dinosauria123
Copy link
Owner

I think you have to use multiple tools.
for example, hocr to pdf is possible hocr-tools.
https://github.com/tmbdev/hocr-tools#hocr-pdf

pdf may have many tools to convert to other format...

@guptaaman2011
Copy link
Author

guptaaman2011 commented Mar 9, 2018 via email

@dinosauria123
Copy link
Owner

Do you know Alto ?
https://en.wikipedia.org/wiki/ALTO_(XML)

If you want to deal with OCR format, Alto is better than hocr.

https://github.com/altoxml/documentation/wiki/Software

@guptaaman2011
Copy link
Author

guptaaman2011 commented Mar 9, 2018 via email

@dinosauria123
Copy link
Owner

dinosauria123 commented Mar 9, 2018

I never used this, but I think it is what you want ...
https://github.com/tabulapdf/tabula-extractor

http://tabula.technology/

I think this topic is not related to gcv2hocr, may I close this issue ?

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

No branches or pull requests

2 participants