marin-community/ar5iv-no-problem-markdown
Marin Markdownified Ar5iv Markdownified Ar5iv transforms academic papers from arXiv into clean, structured Markdown format consisting of 2.74B tokens across two splits. This dataset preserves th content while making it accessible for language model training on academic text. Value Tokens 2 742 463 924 Primary source https://sigmathling.kwarc.info/resources/ar5iv-dataset-2024/ File format JSONL License C-UDA-1.0 (mirrors upstream Ar5iv licenses)… See the full description on the dataset page: https://huggingface.co/datasets/marin-community/ar5iv-no-problem-markdown.
Marin Markdownified Ar5iv
Markdownified Ar5iv transforms academic papers from arXiv into clean, structured Markdown format consisting of 2.74B tokens across two splits. This dataset preserves th content while making it accessible for language model training on academic text.
Processing and Cleaning Pipeline
Our conversion pipeline combines several sophisticated techniques to transform raw Wikipedia HTML into high-quality Markdown:
- HTML Preprocessing: We start with the Ar5iv dump in Extended DOLMA format, which provides HTML representations of academic papers with metadata.
- Structural Cleanup
- The abstract is transformed into a proper section heading for consistent document structure
- LaTeX equations are carefully preserved using inline ($...$) and display ($$...$$) notation
- Code blocks and listings maintain proper formatting with appropriate line breaks
- Noise Reduction:
- Author information is removed
- Title page elements are streamlined to avoid redundancy
- The Ar5iv footer is removed to eliminate conversion metadata
- Figure captions are removed to focus on the main content
- Bibliography sections, footnotes, and citation links are removed
- Formatting Cleanup:
- List items are cleaned to prevent duplicate numbering patterns (e.g., "1. 1.")
- Content before the first main section (typically metadata) is removed
- Equation tables are converted to inline elements for better rendering
- DOM Simplification: We employ a custom-enhanced version of Resiliparse that preserves semantic HTML structure. Rather than flattening to plain text, we retain important elements like headings, paragraphs, lists while removing scripts, tracking code, and boilerplate.
- Markdown Conversion: Our custom Markdownify implementation transforms the simplified DOM into clean Markdown. The final output stores each article as a JSON object containing the Markdown text and essential metadata.
Dataset Variants
The Markdownified Ar5iv dataset comes in two variants:
- Ar5iv No Problem (2.74B tokens): Papers that were converted without significant issues or warnings during the HTML generation process. This subset represents the cleanest and most reliable papers.
- Ar5iv Warning (19.6B tokens): Papers that generated warnings during conversion from LaTeX to HTML. While still valuable, these may contain occasional formatting artifacts.
Usage Example
from datasets import load_dataset
ds = load_dataset(
"marin-community/ar5iv-no-problem-markdown",
split="train",
streaming=True
)
for article in ds.take(3):
print(article["text"])Citation
If you use this dataset in your research, please cite both the original Wikipedia contributors and our work:
@misc{markdownified_ar5iv_2024,
title = {Markdownified Ar5iv},
author = {The Marin Community},
year = {2024},
url = {https://huggingface.co/datasets/marin-community/ar5iv-no-problem-markdown}
}License
All content inherits Ar5iv's licensing: C-UDA-1.0. Our conversion tools and pipeline are released under Apache 2.0.
Acknowledgement
We extend our gratitude to:
- Arxiv Labs and KWARC for their work on the Ar5iv dataset
- Janek Bevendorff for the Resiliparse project
- Matthew Dapena-Tretter for Markdownify
