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

Failure to read varying text sizes in a Newspaper page #624

Open
sinairusinek opened this issue Jul 18, 2024 · 7 comments
Open

Failure to read varying text sizes in a Newspaper page #624

sinairusinek opened this issue Jul 18, 2024 · 7 comments

Comments

@sinairusinek
Copy link

The zip includes the model, the code and the resulting HTML.
The problem is that the get.text works well for a specific size of letters and fails on others. There is very high diversity in font sizes and image resolutions in this corpus.

  • Is there an upper or lower threshold for font size that can be changed?
  • Is there a recommended mechanism that takes the font size/resolution of each block into account to optimize reading result?
    Archive.zip
@dstoekl
Copy link

dstoekl commented Jul 20, 2024

Hi sinai. I am afraid there is no imagefile or alto in the archive.zip. In order to see what is going wrong we need to see the input data.

@sinairusinek
Copy link
Author

sinairusinek commented Jul 21, 2024

FullPg04
Document.zip
Sorry, here they are. No standard Alto but the legacy files from NLI which the code is accessing for the structural information.
Uploading pdf-images.zip…

@sinairusinek
Copy link
Author

Correcting what I asked above: a solution that will take into account the size of the fonts should be adapted to each line, not to each block, because the variance in font size happens also inside blocks, especially in Advertisements.

@dstoekl
Copy link

dstoekl commented Jul 21, 2024

there should not be any issue with font size if the font size is the same over 1 line and the height of an average aleph is bigger than a minimum. lines are normalized to 120 px. it does not matter if your line has a height of 20k pixels or 2k or 200. if it is 20 px it would be too small. and if there are very big letters and very small letters in the same line, then there can be a problem with the SMALL letters due to the normalization, but not with the big letters.

@dstoekl
Copy link

dstoekl commented Jul 21, 2024

to me your problem is not kraken related but rather rooted in an imperfect conversion of the underlying legacy xmls which are your local project task. the structure is too complex to dive into it from the outside without further explanations. it is even hard for me to understand which XML belongs to which image.

@dstoekl
Copy link

dstoekl commented Jul 21, 2024

please join me on gitter as this is not kraken related.

@dstoekl
Copy link

dstoekl commented Jul 21, 2024

on a private channel on gitter

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