Skip to content

feat: Canonicalize the OCR languages across all engines according to the BCP-47 standard - #4075

Draft
nikos-livathinos wants to merge 18 commits into
mainfrom
nli/ocr_language_normalisation
Draft

feat: Canonicalize the OCR languages across all engines according to the BCP-47 standard#4075
nikos-livathinos wants to merge 18 commits into
mainfrom
nli/ocr_language_normalisation

Conversation

@nikos-livathinos

@nikos-livathinos nikos-livathinos commented Aug 25, 2026

Copy link
Copy Markdown
Member

This PR is an implementation of the discussion #3915

Checklist:

  • Documentation has been updated, if necessary.
  • Examples have been added, if necessary.
  • Tests have been added, if necessary.

Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
…s either the BCP-47 standard or

the native input language supported by each OCR engine. Update the tests.

Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
@nikos-livathinos nikos-livathinos self-assigned this Aug 25, 2026
@nikos-livathinos
nikos-livathinos marked this pull request as draft August 25, 2026 17:05
@github-actions

Copy link
Copy Markdown
Contributor

DCO Check Passed

Thanks @nikos-livathinos, all your commits are properly signed off. 🎉

@mergify

mergify Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 1 of 2 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 Require two reviewer for test updates 👀 reviews
🟢 Enforce conventional commit

🔴 Require two reviewer for test updates

Waiting for

  • #approved-reviews-by >= 2
This rule is failing.

When test data is updated, we require two reviewers

  • #approved-reviews-by >= 2

Show 1 satisfied protection

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
… styling free.

This is needed in order to match the expected values

Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
- Fix the advertised language lists (EasyOCR, Tesserct, ocrmac)
- Make --ocr-lang "" reach the engine as lang=[]
- Simplify the implementation of OcrLanguageResolver

Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
…nonicalization mode, simplify code

Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
@nikos-livathinos
nikos-livathinos marked this pull request as ready for review August 28, 2026 09:36
@nikos-livathinos nikos-livathinos changed the title feat: Normalize the OCR languages across all engines according to the BCP-47 standard feat: Canonicalize the OCR languages across all engines according to the BCP-47 standard Aug 28, 2026
@nikos-livathinos
nikos-livathinos marked this pull request as draft August 28, 2026 15:40
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
… the native tokens. Still WIP

Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
…anguage

Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
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

Successfully merging this pull request may close these issues.

1 participant