You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix line number recognition for sparse and accumulated numbering
markLineNumber() rejected valid line-number columns in two cases the size-scaled
coverage threshold from #226 does not cover:
1. Sparse numbering (every 5th/10th line, common in bioRxiv preprints): small,
low-coverage clusters were dropped, so under -noLineNumbers the numbers survived.
2. Accumulated numbering on later pages: line numbers that reach large values (e.g.
428..444 on page 21) sit in an irregular layout (a figure or column break splits
the column), so an even-spacing test rejects them even though the values are a
clean +1 progression.
A low-coverage margin cluster is now accepted as line numbers when its values form a
regular arithmetic progression (dominant constant increment) at the extreme page
margin AND either (a) the smallest value already exceeds the page's line count -
meaning the numbers accumulated from earlier pages and cannot be a per-page list such
as references or figure labels - or (b) the vertical pitch is roughly even (fresh,
small-valued numbering). The margin constraint keeps regular-but-inset labels (figure
panel numbering) intact; reference numbers restart near 1 and fail both paths.
Validated on the GROBID end-to-end corpora: 229336v1 (every 5th line) 242->3, 003657v1
and 018085v1 (every line, values 287..444) fully stripped, removing only digit tokens;
figure panel labels (005124v1) and eLife/PLOS/PMC output unchanged (no regression).
0 commit comments