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

GOCR not working? #5

Open
mdales opened this issue Jun 23, 2019 · 4 comments
Open

GOCR not working? #5

mdales opened this issue Jun 23, 2019 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@mdales
Copy link

mdales commented Jun 23, 2019

With the latest code (as of 23/6/2019) I can't get GOCR to work on either macOS or Debian Linux based maven container image.

43  [main] ERROR org.contentmine.ami.tools.AMIOCRTool  - Cannot run GOCR
java.lang.NullPointerException
	at org.contentmine.norma.image.ocr.GOCRConverter.runGOCR(GOCRConverter.java:425)
	at org.contentmine.ami.tools.AMIOCRTool.runOCR(AMIOCRTool.java:246)
	at org.contentmine.ami.tools.AMIOCRTool.processImageDir(AMIOCRTool.java:421)
	at org.contentmine.ami.tools.ImageDirProcessor.processImageDir(ImageDirProcessor.java:91)
	at org.contentmine.ami.tools.ImageDirProcessor.processImageDirs(ImageDirProcessor.java:60)
	at org.contentmine.ami.tools.AMIOCRTool.processTree(AMIOCRTool.java:218)
	at org.contentmine.ami.tools.AbstractAMITool.processTrees(AbstractAMITool.java:579)
	at org.contentmine.ami.tools.AMIOCRTool.runSpecifics(AMIOCRTool.java:210)
	at org.contentmine.ami.tools.AbstractAMITool.runCommands(AbstractAMITool.java:258)
	at org.contentmine.ami.tools.AMIOCRTool.main(AMIOCRTool.java:188)
>image.6.1.96_553/raw>
>skip gocr>raw.png

This was working earlier in the week for me, so I assume it's related to a recent change @petermr ?

@mdales mdales added the bug Something isn't working label Jun 23, 2019
@petermr
Copy link
Member

petermr commented Jun 23, 2019

I am committing again soon (this evening I hope).
I have not had issues with this code, but we've probably got different versions.
What is the context? -what is it being run from.

@petermr
Copy link
Member

petermr commented Jun 23, 2019

I have run the ami-stata testStack without NPEs:

MacBook-Pro-3:normami pm286$ source  src/test/java/org/contentmine/ami/tools/testStack.sh > src/test/java/org/contentmine/ami/tools/testStack.log
............  trying pxH-fix by Hxp -12  -7   0   3
#       fixed by Hxp to  709   5  12  15
#  trying pxH-fix by Hxp -14  -7   0   3
#       fixed by Hxp to  818   6  13  16
#............MacBook-Pro-3:normami pm286$ 

If you checkout the latest version , edit testStack.sh to point to your StataDirectory and run the above command we can compare notes.

thoughts on managing the test corpus would be useful so we always have a clean version.

@mdales
Copy link
Author

mdales commented Jun 24, 2019

This is the PDF that I was struggling with.
fulltext.pdf

Note tesseract worked.

@petermr
Copy link
Member

petermr commented Jun 24, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants