Repository navigation
fix: drop footnote marks raised after acronyms inside captions - #96
Merged
Merged
Conversation
A table caption can mark the abbreviations it uses, as in jmir-chatmind-rct Table 2: "anxiety (GAD-7a), depression (ODSISb)", where each raised letter points to a note below the table. #89 dropped only marks after a caption's last sentence, so these stayed in the caption as "GAD-7a". A superscript span of lowercase letters ("a" or "a,b") is now left out when it follows a token with two or more capitals. Raised variables such as the "l" of "h" + "l", a single capital such as "W" + "q", and raised digits stay. On all 34 corpus papers (454 captions), only that caption changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Table captions often mark the abbreviations they use with a raised letter that points to a note below the table. jmir-chatmind-rct Table 2 reads "anxiety (GAD-7ᵃ), depression (ODSISᵇ), (PHQ-9ᶜ), and mental well-being (WHO-5ᵈ)". #89 dropped only marks after a caption's last sentence, so the extracted caption kept these as "GAD-7a", "ODSISb", and so on, which reads like different scale names.
spans_textinpdf_captions.pynow also leaves out a superscript span when both of these hold:a,b;GAD-7,ODSIS, orWHO-5.These stay caption text:
lin "h" + "l";W+q;LAI+2orcm+2.Evidence
test_caption_extraction.pygains a parametrized test:hl,Wq,LAI2), which must stay unchanged.... anxiety (GAD-7a), depression (ODSISb), (PHQ-9c), and mental well-being (WHO-5d) scores across study groups.... anxiety (GAD-7), depression (ODSIS), (PHQ-9), and mental well-being (WHO-5) scores across study groups.python3 -m pytest -q -n auto: 1739 passed, 1 skipped.python3 -m pytest -q -m corpus: 368 passed, 21 xfailed (unchanged).python3 -m ruff check skills tests: clean.Merge Danger
QKwith a raisedt, would lose that letter. No corpus caption does this.🤖 Generated with Claude Code