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

Inconsistency in APIExample wiki page #2832

Closed
NilsIrl opened this issue Dec 25, 2019 · 2 comments
Closed

Inconsistency in APIExample wiki page #2832

NilsIrl opened this issue Dec 25, 2019 · 2 comments

Comments

@NilsIrl
Copy link

NilsIrl commented Dec 25, 2019

Current Behavior:

The the wiki page APIExample, for the python example, the handle api is is run through the TessBaseAPIDelete funciton if the api failed to be initialized whereas for the C example below, this is not the case.

python:

rc = tesseract.TessBaseAPIInit3(api, TESSDATA_PREFIX, lang)
if (rc):
    tesseract.TessBaseAPIDelete(api)
    print("Could not initialize tesseract.\n")
    exit(3)
if(TessBaseAPIInit3(handle, NULL, "eng") != 0)
    die("Error initializing tesseract\n");

Expected Behavior:

Either the python example doesn't destroy the api handle or the api handle is destroyed in the c example.

Suggested Fix:

Chose one the behaviour. I do not know tesseract enough to be able to tell which one to choose though I feel like the correct one would be to add TessBaseAPIDelete to the C example as it seems to be an omission. Also I was unable to find the documentation of the function TessBaseAPIDelete so I cannot give more information.

@NilsIrl NilsIrl changed the title Inconsistency in APIExample Inconsistency in APIExample wiki page Dec 25, 2019
@Olaoluw003
Copy link

I don't understand

@NilsIrl
Copy link
Author

NilsIrl commented May 26, 2020

Moved to tesseract-ocr/tessdoc#14

@NilsIrl NilsIrl closed this as completed May 26, 2020
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