CoolFace
Datasetpublic

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.

sourceHugging Facecc-by-4.0updated 7mo agoView on Hugging Face
0likes63downloads
Dataset Card

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

ColumnTypeDescription
imageImageRendered page image (150 DPI)
pdf_sourcestringRelative path to the original PDF or image file
page_numberint32Page number within the source document (1-indexed)
textstringExtracted text for the page (OCR or pdf-parse)
ministrystringOriginating ministry (interior, exteriores, defensa)
archive_idstringArchival signature (e.g., AGA-83-07633, AGMAE-R39017)

Dataset Statistics

MetricValue
Total rows (pages)1,224
Source documents167
Text coverage100% (all pages have extracted text)
Total extracted text~12.6 million characters
File types155 PDFs (92.8%), 12 JPGs (7.2%)

Documents by Ministry

MinistryDocumentsDescription
defensa108Military intelligence reports (CESID/CNI), internal memos
exteriores31Diplomatic cables, embassy communications, verbal notes
interior28Wiretap transcripts from the Guardia Civil, phone intercepts between conspirators

Document Characteristics

PropertyBreakdown
Format90 typed, 73 scanned, 4 handwritten
Classification level88 secreto, 77 reservado, 2 confidencial
Pages per documentMin: 1, Max: 312, Mean: 7.3
Text length per documentMin: 130 chars, Median: 26.8K chars, Max: 3.45M chars

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:

  1. 1.pdf-parse (typed documents): Direct text extraction from digitally-created PDFs
  2. 2.Vision-Language OCR (scanned/handwritten documents):
  3. 3.Model: `mlx-community/GLM-OCR-bf16` running on Apple Silicon via MLX
  4. 4.Input resolution: 200 DPI
  5. 5.Max tokens per page: 8,192
  6. 6.Post-processing: Whitespace normalization, paragraph structure preservation

The isOcrText field in the source metadata indicates which method was used per document.

Usage

python
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.