-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Add languages parameter to hOCR output metadata #4531
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -477,6 +477,12 @@ TessHOcrRenderer::TessHOcrRenderer(const char *outputbase, bool font_info) | |||||||||||||
| font_info_ = font_info; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| void TessHOcrRenderer::SetInputLanguages(const char *languages) { | ||||||||||||||
| if (languages) { | ||||||||||||||
| input_languages_ = languages; | ||||||||||||||
|
||||||||||||||
| if (languages) { | |
| input_languages_ = languages; | |
| if (languages && languages[0] != '\0') { | |
| input_languages_ = languages; | |
| } else { | |
| input_languages_.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding
std::string input_languages_toTessHOcrRendererchanges the size/layout of this exported (TESS_API) C++ class, which can break binary compatibility for downstream code that links against libtesseract and instantiatesTessHOcrRenderer. If ABI stability is a concern, consider storing the new state behind an indirection (pimpl/opaque pointer) or in a separate internal structure to minimize ABI impact.