Commit fe79689
committed
Stop the legend parse from swallowing byline and ORCID text; score it honestly
The eval accepted any assigned affiliation that merely CONTAINED the
ground-truth tokens, so two posters scored as passing while carrying
junk: gasimova's affiliation 1 read "Aydan Gasimova 1 FAIR Data
Innovations Hub, ..." and isporeu2023's entry 6 read "... Darmstadt,
Germany ORCID iDs: Ivanyi P". The author-to-institution mapping was
right, which is all the metric could see. _affil_match is now
asymmetric: an assigned string may say less than ground truth (poster
legends abbreviate what deposit metadata spells out, "STScI" for "Space
Telescope Science Institute (STScI)"), but not more, because tokens
ground truth lacks are text that leaked in through a mis-bounded entry.
That is the failure this harness exists to catch. Honest scoring dropped
the board to 17/21 before any of the fixes below.
Three real defects, each fixed at its root:
A poster's legend is one contiguous run of text: a line in the human
markdown, a block in extracted output. The parse ranged over the whole
banner region instead, so a byline ending "... Bhavesh Patel 1 Aydan
Gasimova" offered a perfect "1 <Capitalized>" match that opened the run
and made entry 1 swallow the lead author's name. Parses are now tried
line-bounded first (longest run first), which also bounds the trailing
entry at the line's end; the whole-region parse stays as a fallback for a
legend split across lines.
gasimova's byline markers sit 21.2pt above a 43pt baseline, but
_cluster_lines derives its tolerance from the leaf's AVERAGE font size,
which the 63pt title drags down to 19.5pt. The marker row was stranded
on its own line and interleaved back into the names, scrambling the
author order. A row is now rejoined with the line it annotates when it
is marker glyphs only, materially smaller, within an em of the baseline,
and horizontally inside that line's run. Geometry alone was not enough:
gated on size and position only, the rule fired 65 times on one poster
(single letters from rotated axis labels), merged poster 42's byline
into its title, and cost rField on three posters. Requiring digits and
nothing else, plus at least two of them, narrows it to exactly one merge
across the corpus - the row it was written for. A lone digit is too weak
to act on, since rejoining a row shifts the median line height the block
grouper keys on and re-blocks the page; that is what damaged 8228476
(RTL, deferred to approach D), whose banner the merge did not help
anyway.
An ORCID iD list is a contact tail like the emails and URLs _AFFIL_TAIL
already trims, and isporeu2023's gen path puts it in the legend's own
block at the same size, where no structural boundary exists to find.
Also fixes an asterisk artifact the newline-joined region introduced in
64e9bfe: _AFFIL_TAIL's " * " needed literal spaces and no longer matched
" *\n", leaving 4560930's Osten with "STScI, Baltimore, MD *".
Honest board: 19/21 acceptable, 11/13 numbered end-to-end, 12/13
logic-OK. gasimova and isporeu2023 now PASS on merit, with every
affiliation string verbatim-correct. rField 0.729, w 0.976, rGlobal
0.835, no per-poster regressions, suite green (260 passed). Remaining:
8228476 (RTL, approach D) and 42, whose ground truth carries three
authors and three affiliations the poster does not print.1 parent 86afd80 commit fe79689
5 files changed
Lines changed: 2716 additions & 48 deletions
File tree
- calibration
- baselines
- poster2json
0 commit comments