JorgeAV/23f-expediente
Expediente 23-F: Declassified Documents from the 1981 Spanish Coup Attempt A page-level multimodal dataset of declassified Spanish government documents related to the failed coup d'etat of February 23, 1981 (known as 23-F). Each row contains a rendered page image paired with its extracted text, sourced from official state archives. Historical Context On February 23, 1981, Lieutenant Colonel Antonio Tejero stormed the Spanish Congress of Deputies with armed Guardia… See the full description on the dataset page: https://huggingface.co/datasets/JorgeAV/23f-expediente.
Expediente 23-F: Declassified Documents from the 1981 Spanish Coup Attempt
A page-level multimodal dataset of declassified Spanish government documents related to the failed coup d'etat of February 23, 1981 (known as 23-F). Each row contains a rendered page image paired with its extracted text, sourced from official state archives.
Historical Context
On February 23, 1981, Lieutenant Colonel Antonio Tejero stormed the Spanish Congress of Deputies with armed Guardia Civil officers during the investiture vote of Prime Minister Leopoldo Calvo-Sotelo. The coup failed after King Juan Carlos I publicly opposed it in a televised address. These documents were declassified and published by the Spanish Government through the Portal de Archivos Estatales.
Dataset Schema
Dataset Statistics
Documents by Ministry
Document Characteristics
Data Processing Pipeline
Image Rendering
- Tool:
pdf2image+ Poppler - Resolution: 150 DPI (PNG)
- JPG documents are loaded directly as single-page images
Text Extraction
Two extraction methods were used depending on document type:
- pdf-parse (typed documents): Direct text extraction from digitally-created PDFs
- Vision-Language OCR (scanned/handwritten documents):
- Model: `mlx-community/GLM-OCR-bf16` running on Apple Silicon via MLX
- Input resolution: 200 DPI
- Max tokens per page: 8,192
- Post-processing: Whitespace normalization, paragraph structure preservation
The isOcrText field in the source metadata indicates which method was used per document.
Usage
from datasets import load_dataset
ds = load_dataset("JorgeAV/23f-expediente")
# Display a page
print(ds["train"][0]["text"])
ds["train"][0]["image"].show()
# Filter by ministry
interior = ds["train"].filter(lambda x: x["ministry"] == "interior")
# Get all pages from a specific document
doc_pages = ds["train"].filter(lambda x: x["pdf_source"] == "interior/guardia-civil/23F_1_conversacion_gc_tejero.pdf")Intended Uses
- Historical research on the Spanish Transition to democracy
- Document AI benchmarking: OCR, layout analysis, and document understanding on Spanish historical documents
- NLP in Spanish: text extraction quality evaluation, named entity recognition on official/archival language
- Educational projects about 20th-century European political history
Limitations
- OCR quality is lower on handwritten documents (4 out of 167)
- Some scanned pages may contain text artifacts or recognition errors
- Text extraction from multi-column layouts may not preserve reading order perfectly
- All text is in Spanish; no translations are provided
Source & License
- Original documents: Public domain (declassified records from the Spanish Government, published via the Portal de Archivos Estatales)
- Structured dataset: CC-BY-4.0
Associated Project
This dataset powers 23f-expediente, an interactive educational web application with an FBI/spy case-file aesthetic for exploring the 23-F documents.
