Skip to content

Fix context-aware PDF annotation disambiguation - #64

Merged
tenglvjun merged 3 commits into
mainfrom
codex/pdf-annotation-context-disambiguation
Aug 15, 2026
Merged

Fix context-aware PDF annotation disambiguation#64
tenglvjun merged 3 commits into
mainfrom
codex/pdf-annotation-context-disambiguation

Conversation

@tenglvjun

Copy link
Copy Markdown
Owner

Summary

  • preserve bounded visible context around Markdown selections and use it with page hints to select the correct occurrence in the PDF
  • resolve existing Zotero PDF annotations to a unique Markdown range using pageIndex, the source offset encoded in sortIndex, and up to 80 Unicode code points of PDF context
  • apply context disambiguation to both exact and normalized text matches while preserving ambiguous results when context or the local PDF index is unavailable
  • improve PDF/Markdown normalization for LaTeX relational operators, temperature units, and related extraction differences
  • document the bidirectional matching behavior in English and Simplified Chinese

Verification

  • npm run check
  • npm test (1156/1156 passed)
  • npm run build
  • replayed Zotero annotation 905 against the reported wrist-temperature paper: one match at Markdown range 1096..1270, zero unmatched annotations
  • verified the generated XPI contains the runtime text-quote wiring
  • kept all version fields at 0.3.0

@tenglvjun
tenglvjun merged commit 86cbb6f into main Aug 15, 2026
3 checks passed
@tenglvjun
tenglvjun deleted the codex/pdf-annotation-context-disambiguation branch August 15, 2026 13:19
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

Successfully merging this pull request may close these issues.

1 participant