Open Balearica opened 3 months ago
Given that the amount of information retrieved for blocks
was found to inflate runtime (see #916), I am now planning to simply remove these properties in v6.
Even if this feature worked correctly (in that it accurately reported what Tesseract finds), it would still only be useful in extremely niche circumstances, if ever. Tesseract LSTM (the default) does not perform font detection at all, and Tesseract Legacy performs poorly with font identification, so this information would either be missing or inaccurate even if this bug was fixed.
The
blocks
output format includes various font attributes on theword
level, includingis_italic
andis_serif
. These do not appear to be functioning properly, and seem to always returnfalse
, even when using the Legacy model and when font identification worked correctly.For example, when running recognition with the Legacy engine on the image below, the font is correctly recognized as an italic/serif font (![italic_example_1](https://github.com/naptha/tesseract.js/assets/100809261/927cab01-dd0b-4383-a735-d1d994b0d159)
Times_New_Roman_Italic
). However, despite this, theis_italic
andis_serif
attributes are both false.If this is an issue with Tesseract.js/Tesseract.js-core we should fix. If it is an issue on the Tesseract side, where the information is always incorrect, these should be removed from our output to avoid confusion (in the next major version).
Note that this is distinct from general accuracy issues with Tesseract font recognition, or the fact that it only runs on Legacy, which are outside of the scope of this repo. This issue is specific to cases where Tesseract correctly identifies the font but is still returning the wrong font attributes.