PaperMage is an open-source Python library from the Allen Institute for AI that supports natural language processing and computer vision research on scientific papers. It turns PDFs of research papers into structured, machine-readable representations that downstream models can reason over, bridging the gap between raw documents and NLP pipelines. The project is hosted on GitHub, where it has earned roughly 815 stars, and it was presented as a research prototype at EMNLP 2023.
Scientific papers are notoriously hard to process programmatically: two-column layouts, figures, tables, equations and references all break naive text extraction. PaperMage represents a document as a hierarchy of entities โ tokens, lines, blocks, rows and more โ each carrying both textual content and visual bounding-box information. On top of that representation it provides predictors that detect document structure and visualizers that render annotated pages, which makes it a practical foundation for tasks like literature mining, citation analysis and multimodal document understanding. The maintainers note that the prototype is not updated on a regular cadence, with related PDF-parsing work continuing under AI2’s Dolma project. Because its document representation preserves both text and geometry, extracted content can feed downstream tasks such as question answering over papers, figure and table extraction, and semantic search across a literature collection.
PaperMage is free and open source under the Apache License 2.0. There are no paid plans or hosted services attached to the library.
PaperMage is for NLP and document-understanding researchers who need to extract structured, layout-aware content from scientific PDFs for mining, analysis or multimodal modelling.