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

German recognition of word breaks at the end of lines not treated correctly when concatenating lines #33

Open
notYetLost opened this issue Jun 13, 2021 · 2 comments

Comments

@notYetLost
Copy link

In German word breaks at the end of some line are represented by a "-" directly after the last character of the word.

The Android App "OCR" concatenates lines appending a space after the line-break character.
Otherwise OCR does a superb job!

The issue could easily be fixed with the following procedure when concatenating lines:

If a line contains a "-" at the end, check the first word of the next line:

if the word is "und" or "oder" keep the "-" and insert a space when concatenating the lines (current procedure)
with other first word: when the word starts with a lower case character drop the "-" when concatenating the lines, otherwise keep the "-"; do NOT insert an additional space when concatenating the lines.

TesseractOcrAndroid-TestPage
2021-06-13 08_Tesseract-German-Recognition

@notYetLost
Copy link
Author

in some rare cases as shown in the second attachment commenting the OCR result, my suggested procedure will incorrectly drop a space: usage of "-" at the end of a line back referencing a word used in some additional context.

Example in the OCR result, where my suggestion would fail: "Microsoft- auf ein lokales Konto" - if this "-" would have been at the end of the line.
However this is a very, very rare case!

@pixel2user
Copy link

@notYetLost - Thank you for detailing the needed algorithm! Greetings from Berlin! :-)

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