appjsonify: An Academic Paper PDF-to-JSON Conversion Toolkit

Atsuki Yamaguchi, Terufumi MorishitaarXiv 2023 · DOI · arXiv

Abstract

appjsonify is a Python-based toolkit designed to bridge the gap between unstructured academic PDFs and machine-readable data. By utilizing a customizable pipeline that integrates machine learning models like Faster R-CNN with rule-based heuristics, it enables the extraction of sections, paragraphs, and metadata from diverse paper formats. The toolkit offers pre-configured "recipes" for major AI/ML venues, ensuring high-quality structured JSON output for downstream research applications.

Introduction

In the rapidly evolving field of AI research, the primary medium for knowledge dissemination—the PDF—remains a significant barrier to automated analysis. Academic papers are notoriously difficult to parse due to inconsistent formatting, including varying column layouts, citation styles, and the placement of non-textual elements like figures and tables.

Existing Document Layout Analysis (DLA) models often struggle with this variability, as they frequently fail when encountering layouts that deviate from their training data. This lack of robustness hinders the development of downstream applications such as automated fact-checkers, paper recommendation engines, and the creation of clean datasets for training Large Language Models (LLMs). appjsonify addresses these challenges by providing a flexible, modular framework for PDF-to-JSON conversion.

Methodology

The core of appjsonify is a modular, pipeline-based architecture that allows users to tailor the extraction process to specific document types. Unlike monolithic models, this approach provides granular control over each stage of processing.

The appjsonify pipeline architecture, illustrating the flow from PDF input to structured JSON output through modular processing steps.

The workflow consists of several swappable modules:

  1. Visual Analysis: Employs Faster R-CNN to detect objects such as tables, figures, and equations within the document pages.
  2. Text Extraction: Utilizes pdfplumber to extract raw text along with metadata, including bounding boxes and font properties.
  3. Customizable Pipeline: Users can chain modules (e.g., extract_captions, remove_tables, detect_sections) to handle specific layout quirks, such as unnumbered section headers identified through font size heuristics.
  4. Conference Recipes: To simplify usage, the toolkit includes pre-configured recipes for major venues like AAAI, ICML, NeurIPS, and ACL, allowing researchers to process papers from these sources with minimal setup.

Datasets

The machine learning components of appjsonify are trained on several gold-standard DLA benchmarks to ensure high accuracy:

  • PubLayNet: Used for identifying general layout elements such as text blocks, titles, and lists.
  • TableBank: Specifically utilized for high-accuracy table detection and recognition.
  • DocBank: A fine-grained dataset covering 13 document categories, used to refine the precision of bounding box detectors.

Key Insights and Ideas

The development of appjsonify is guided by several key principles:

  • Hybrid Intelligence: The system combines ML-based object detection with rule-based text processing. This hybrid approach achieves higher reliability than ML-only methods by leveraging deterministic heuristics for tasks like header identification.
  • Flexibility as a Feature: Recognizing that users understand their data best, the toolkit provides a Command Line Interface (CLI) where specific pipelines can be defined via the --pipeline argument.
  • Standardization of Output: By enforcing a consistent hierarchical JSON structure—where each section contains a title and a list of content paragraphs—the toolkit ensures that the output is immediately "machine-consumable" for NLP tasks.

Results and Usability

appjsonify is publicly available via PyPI (pip install appjsonify) and GitHub. It provides both a CLI and a Python API, making it accessible for various research workflows. The system successfully parses complex multi-column layouts into structured JSON, correctly identifying sections and subsections even in the absence of explicit numbering. Furthermore, it offers out-of-the-box support for nearly a dozen major publication formats, including IEEE, ACM, and Springer.

Limitations and Future Work

While appjsonify represents a significant step forward, the authors identify several areas for future improvement. Plans include integrating state-of-the-art OCR-free models like Nougat to enhance extraction quality. Additionally, future versions aim to expand support for multilingual documents and improve robustness against extremely non-standard or low-quality scanned PDFs.

Summary updated

Abstract

We present appjsonify, a Python-based PDF-to-JSON conversion toolkit for academic papers. It parses a PDF file using several visual-based document layout analysis models and rule-based text processing approaches. appjsonify is a flexible tool that allows users to easily configure the processing pipeline to handle a specific format of a paper they wish to process. We are publicly releasing appjsonify as an easy-to-install toolkit available via PyPI and GitHub.
BibTeX
@misc{yamaguchi2023appjsonify,
  author = {Atsuki Yamaguchi and Terufumi Morishita},
  title = {{appjsonify: An Academic Paper PDF-to-JSON Conversion Toolkit}},
  year = {2023},
  eprint = {2310.01206},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.01206},
}
Figure