Datasets:

Languages:
English
ArXiv:
License:
DefExtra / README.md
bitwise31337's picture
Upload folder using huggingface_hub
eb85afa verified
---
license: cc-by-4.0
language: en
task_categories:
- text-classification
- question-answering
- text-retrieval
---
# DefExtra
<p align="center">
<a href="https://arxiv.org/abs/2602.05413"><img src="https://img.shields.io/badge/arXiv-2602.05413-b31b1b" alt="arXiv:2602.05413"></a>
<a href="https://sigir.org/"><img src="https://img.shields.io/badge/SIGIR%202026-under%20review-0054a6" alt="SIGIR 2026 under review"></a>
<a href="https://huggingface.co/datasets/mediabiasgroup/DefExtra"><img src="https://img.shields.io/badge/HF%20Dataset-DefExtra-ff9d00" alt="HF Dataset DefExtra"></a>
<a href="https://huggingface.co/datasets/mediabiasgroup/DefSim"><img src="https://img.shields.io/badge/HF%20Dataset-DefSim-ff9d00" alt="HF Dataset DefSim"></a>
<a href="https://media-bias-group.github.io/SciDef-ProjectPage/"><img src="https://img.shields.io/badge/Project%20Page-SciDef-2e7d32" alt="SciDef Project Page"></a>
<a href="https://doi.org/10.5281/zenodo.18501198"><img src="https://img.shields.io/badge/Zenodo-10.5281%2Fzenodo.18501198-1682D4?logo=zenodo" alt="Zenodo DOI: 10.5281/zenodo.18501198"></a>
<a href="https://github.com/Media-Bias-Group/SciDef"><img src="https://img.shields.io/badge/Code-GitHub-181717?logo=github" alt="Code on GitHub"></a>
</p>
## Overview
DefExtra contains 268 definition records (term, definition, context, type) from 75 papers. **We do not ship excerpts from papers** due to copyright. Instead, we ship markers and scripts that let users hydrate the dataset from their own PDFs.
Why this workflow:
- We cannot redistribute copyrighted excerpts.
- We therefore ship **only localization markers** plus scripts to reconstruct the text from user‑supplied PDFs.
## Examples (from our own papers; after hydration)
| Source | Concept | Definition | Context (excerpt) |
| --- | --- | --- | --- |
| [https://aclanthology.org/2024.lrec-main.952](https://aclanthology.org/2024.lrec-main.952) | `media bias` | “a skewed portrayal of information favoring certain group interests, which manifests in multiple facets, including political, gender, racial, and linguistic biases.” | “Media bias is a skewed portrayal of information favoring certain group interests … Such subtypes of bias … make the classification of media bias a challenging task.” |
| [https://arxiv.org/abs/2312.16148](https://arxiv.org/abs/2312.16148) | `spin bias` | “a form of bias introduced either by leaving out necessary information or by adding unnecessary information.” | “Spin Bias describes a form of bias introduced either by leaving out necessary information … or by adding unnecessary information.” |
## Quickstart (DefExtra hydration)
1) Put PDFs in `pdfs/` (filename should match `paper_id`, DOI/PII alias, or arXiv ID).
2) Start a GROBID server (see `docs/defextra_hydration.md`).
3) Hydrate:
```bash
uv run python scripts/hydrate_defextra.py \
--legal-csv data/defextra_legal.csv \
--pdf-dir pdfs \
--grobid-out grobid_out \
--output-csv defextra_hydrated.csv \
--report defextra_hydrated_report.txt \
--require-complete
```
## Getting PDFs
- See `docs/get_pdfs.md` for sources and a helper script that lists required PDFs.
- `defextra_required_pdfs.csv` and `defextra_required_pdfs.md` are precomputed lists.
## Environment (uv)
- This repo ships a `pyproject.toml` with all dependencies.
- Run any script with `uv run python ...` and uv will resolve/install deps.
## Data files
- `data/defextra_legal.csv` / `data/defextra_legal.parquet`: DefExtra markers (no excerpts).
## Hydrated columns
The hydrated output (e.g., `defextra_hydrated.csv`) matches the schema below.
Full legal marker columns are documented in `docs/defextra_hydration.md`.
| Column | Description |
| --- | --- |
| `paper_id` | Paper identifier (often a Semantic Scholar ID, DOI, or arXiv ID). |
| `paper_title` | Paper title. |
| `paper_doi` | DOI (if available). |
| `paper_arxiv` | arXiv ID or URL (if available). |
| **`concept`** | Term / concept being defined. |
| **`definition`** | Definition text (hydrated from PDFs). |
| **`context`** | Context excerpt (hydrated from PDFs). |
| **`definition_type`** | Definition type (e.g., explicit / implicit). |
| `source_file` | Source JSON filename used during curation. |
| **`is_out_of_domain`** | Boolean flag for out‑of‑domain papers. |
## Scripts
- `scripts/hydrate_defextra.py`: hydrate DefExtra from PDFs + GROBID.
- `scripts/pdf_to_grobid.py`: batch GROBID runner (requires a running GROBID server).
- `scripts/list_defextra_pdfs.py`: list required PDFs + download links.
- `scripts/build_defextra_test_pdfs.py`: build a test PDF set from a larger PDF pool.
- `scripts/report_defextra_status.py`: summarize missing items by paper/definition.
## Documentation
- [`docs/defextra_hydration.md`](docs/defextra_hydration.md) (technical details, CLI flags, markers).
- [`docs/get_pdfs.md`](docs/get_pdfs.md) (how to find PDFs).
- [`docs/mismatch_examples.md`](docs/mismatch_examples.md) (mismatch types with short excerpts).
## Expected minor mismatches
- Small differences vs. the manual reference can occur due to PDF/GROBID text normalization.
- Typical cases: line‑break hyphenation, spacing around numbers, citation formatting.
- These are documented and do not affect the ability to hydrate all entries.
## Notes
- Hash IDs are typically Semantic Scholar paper IDs; many PDFs can be obtained from Semantic Scholar.
- If you see PDF hash mismatch warnings, verify you have the correct paper version and rerun with `--allow-pdf-hash-mismatch` only after manual inspection.
- The script was largely produced using LLMs for robustness.
## Citation
```bibtex
@misc{kucera2026scidefautomatingdefinitionextraction,
title={SciDef: Automating Definition Extraction from Academic Literature with Large Language Models},
author={Filip Ku\v{c}era and Christoph Mandl and Isao Echizen and Radu Timofte and Timo Spinde},
year={2026},
eprint={2602.05413},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2602.05413},
}
```