-
Notifications
You must be signed in to change notification settings - Fork 255
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
Allow to show tesseract and leptonica messages (easily) #348
Comments
I guess we can expose a utility function to call leptonica's |
Just pushed the changes that expose a new function I also did some tests setting the Frankly, I tried to experiment with possible changes to see if it would affect this behavior but nothing worked. This looks like an issue with tesseract's API and not the way we're wrapping it. Any thoughts? |
can we change the default back to silenced? this was quite a surprised to see a lot of (noisy) output when upgrading |
You can |
I understand I can do that, but the console spew is a regression from previous versions and I would prefer it to not do spew by default |
while I agree with you that it's an inconvenience, I think the current behavior should've been the default from the start. tesserocr is just a wrapper around tesseract and should minimize any mutation to tesseract's default behavior as much as possible |
the tesseract cli doesn't spew output either so I don't see your point |
the tesseract cli is a tool that calls into tesseract's API, you can code the same functionality using tesserocr for example (and include suppressing messages). |
I cannot imagine anyone that would want the behavior you've changed it to to be the default. I would expect the api to have a sensible default (like it did). now every user of your library needs to add two more lines to restore the old desirable behavior. I think the defaults that the tesseract cli should be a strong indicator that this change is undesirable. nobody wants an API that sends a bunch of junk output by default |
Users of the C++ API would have to do exactly that. However, I agree that in the typical Python dev's use-case it's probably preferable to not have all this output (reminiscent of all the annoying messages spewed by torch/tensorflow for example). I'm not opposed to going back to disabling it, you're the first person to complain tho so I'm not sure people are as bothered. Perhaps you can open a separate issue about it and see if more people are interested |
Just note: my original intention was to have option turn on messages, so if anything goes wrong, user/developer can have a look at the messages without recompiling tesserocr. |
Be default messages from leptonica and tesseract are silenced .
However, when things do not work, it is useful to turn them on.
Is there a way to set custom Leptonica message severity?
For tesseract I can use
api.SetVariable('debug_file', 'tessocr.log')
, but there is some strange behavior. E.g:Following code will create only
tesserocr.debug1.log
, but puts there 2 times the same information (Estimating resolution as 487)The text was updated successfully, but these errors were encountered: