oliverkinch/eur-lex-sum
EUR-Lex-Sum A dataset of EU legislation paired with legislative summaries from EUR-Lex, covering Danish and English. Built from the EU Publications Office CELLAR repository using SPARQL-based discovery and XHTML content extraction. Dataset Description Each record pairs a full EU legislative document with its official plain-language summary from the EUR-Lex Summaries of EU Legislation collection. Configs Config Records Description all… See the full description on the dataset page: https://huggingface.co/datasets/oliverkinch/eur-lex-sum.
EUR-Lex-Sum
A dataset of EU legislation paired with legislative summaries from EUR-Lex, covering Danish and English.
Built from the EU Publications Office CELLAR repository using SPARQL-based discovery and XHTML content extraction.
Dataset Description
Each record pairs a full EU legislative document with its official plain-language summary from the EUR-Lex Summaries of EU Legislation collection.
Configs
The all config is the intersection of da and en.
Usage
from datasets import load_dataset
# Load default (bilingual) config
ds = load_dataset("oliverkinch/eur-lex-sum")
# Load Danish only
ds_da = load_dataset("oliverkinch/eur-lex-sum", "da")
# Load English only
ds_en = load_dataset("oliverkinch/eur-lex-sum", "en")Fields
`all` config:
`da` config: celex_id, da_document, da_summary
`en` config: celex_id, en_document, en_summary
Statistics
Dataset Construction
Source
Documents and summaries were obtained from the EU Publications Office CELLAR repository via:
- SPARQL discovery — querying the CELLAR endpoint to find legislation with linked legislative summaries available as XHTML in Danish (and optionally English).
- Content extraction — fetching XHTML manifestations and extracting body text.
Filtering
The following filters were applied per language:
- Availability — remove records where document or summary content is missing (HTTP 404 from CELLAR).
- PDF scan artifacts — remove records containing
[NEW PAGE]markers (residual from scanned PDFs). - Deduplication — when multiple CELEX IDs share an identical summary, keep the record with the longest document.
- Short document removal — remove records where the document is shorter than or equal to the summary (by whitespace token count).
Text Cleaning
- Non-breaking spaces (
\xa0) normalized to regular spaces. - Consecutive newlines collapsed into paragraph boundaries.
- Blank lines and
.xmlidentifier lines removed.
Pipeline
Starting from 2,838 discovered CELEX IDs:
Related Datasets
- dennlinger/eur-lex-sum — the original EUR-Lex-Sum dataset covering 24 EU languages. This dataset uses a similar methodology but sources data from CELLAR (the original EUR-Lex scraping endpoint is now behind WAF bot protection).
License
The legislative documents and summaries are sourced from EUR-Lex. EU legal documents are available under the reuse policy of the European Commission (CC BY 4.0 compatible).
