Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot extract the features (columns) for the split 'train' of the config 'corpus' of the dataset.
Error code:   FeaturesError
Exception:    UnicodeDecodeError
Message:      'utf-8' codec can't decode byte 0xf0 in position 7: invalid continuation byte
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/split/first_rows.py", line 243, in compute_first_rows_from_streaming_response
                  iterable_dataset = iterable_dataset._resolve_features()
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 4195, in _resolve_features
                  features = _infer_features_from_batch(self.with_format(None)._head())
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2533, in _head
                  return next(iter(self.iter(batch_size=n)))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2711, in iter
                  for key, pa_table in ex_iterable.iter_arrow():
                                       ^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2249, in _iter_arrow
                  yield from self.ex_iterable._iter_arrow()
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 494, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 384, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/csv/csv.py", line 196, in _generate_tables
                  csv_file_reader = pd.read_csv(file, iterator=True, dtype=dtype, **self.config.pd_read_csv_kwargs)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/streaming.py", line 73, in wrapper
                  return function(*args, download_config=download_config, **kwargs)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/utils/file_utils.py", line 1250, in xpandas_read_csv
                  return pd.read_csv(xopen(filepath_or_buffer, "rb", download_config=download_config), **kwargs)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 1026, in read_csv
                  return _read(filepath_or_buffer, kwds)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 620, in _read
                  parser = TextFileReader(filepath_or_buffer, **kwds)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 1620, in __init__
                  self._engine = self._make_engine(f, self.engine)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 1898, in _make_engine
                  return mapping[engine](f, **self.options)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 93, in __init__
                  self._reader = parsers.TextReader(src, **kwds)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "pandas/_libs/parsers.pyx", line 574, in pandas._libs.parsers.TextReader.__cinit__
                File "pandas/_libs/parsers.pyx", line 663, in pandas._libs.parsers.TextReader._get_header
                File "pandas/_libs/parsers.pyx", line 874, in pandas._libs.parsers.TextReader._tokenize_rows
                File "pandas/_libs/parsers.pyx", line 891, in pandas._libs.parsers.TextReader._check_tokenize_status
                File "pandas/_libs/parsers.pyx", line 2053, in pandas._libs.parsers.raise_parser_error
                File "<frozen codecs>", line 322, in decode
              UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf0 in position 7: invalid continuation byte

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

SpanishMicroEvents

SpanishMicroEvents is the first publicly available multimodal dataset for fine-grained news micro-event detection and retrieval in Spanish. It contains 13,831 news articles from a single Spanish outlet (2024-2025), organized into 1,632 micro-events through a two-phase construction pipeline combining neural topic modelling and hybrid temporal segmentation.

Each article is represented by three modalities:

  • Text: multilingual E5-small embeddings (384d)
  • Image: CLIP ViT-B/32 embeddings (512d), one per unique MD5 image hash
  • Temporal: daily publication-density signal per micro-event

Paper: SpanishMicroEvents: A Multimodal Dataset for Fine-Grained News Event Retrieval in Spanish β€” Under review.


Dataset Structure

Files

File Description
articles.parquet Main article-level dataset (13,831 Γ— 14 columns)
micro_events.csv Micro-event summary table (1,632 rows)
embeddings_e5_small.npy Text embeddings aligned 1:1 with articles.parquet (N Γ— 384)
embeddings_clip_articulos.npy CLIP image embeddings aligned 1:1 with articles.parquet (N Γ— 512)
validation_sample.csv Manually annotated quality sample (50 micro-events)

articles.parquet β€” column reference

Column Type Source Description
id int Raw corpus Unique article identifier
url str Raw corpus Article URL
publication_date datetime Raw corpus Publication timestamp
headline str Raw corpus Article headline
article_body str Raw corpus Full article body text
description str Raw corpus Article description/teaser
image_hash str Raw corpus MD5 hash of the associated image
named_entities list[dict] phase0_corpus_enrichment Named entities extracted with Stanza (fields: text, type; types: PER, ORG, LOC, MISC)
dbpedia_entities_raw list[dict] phase0_corpus_enrichment Raw DBpedia entity linking output before deduplication (fields: text, uri, types)
named_entities_dbpedia list[dict] phase0_corpus_enrichment Deduplicated DBpedia-linked entities (fields: text, uri, types)
date_mentions list[str] phase0_corpus_enrichment Raw date mentions detected in the text
extracted_dates list[str] phase0_corpus_enrichment Normalised date expressions extracted from text
micro_event_id str phase2_temporal_segmentation Micro-event identifier. Format: "{topic_id}" for atomic events, "{topic_id}_{segment}" for split clusters. Value "-1" indicates the article was not assigned to any valid micro-event (singleton or isolated burst).
event_label str phase2_temporal_segmentation JIT label for the micro-event: top-4 BM25-weighted c-TF-IDF terms, deduplicated by Porter stem (e.g. "Γ‘balos_fiscal_koldo_corrupciΓ³n").

micro_events.csv β€” column reference

Column Type Description
micro_event_id str Micro-event identifier (matches articles.parquet)
label str JIT event label
start_date date First article date
end_date date Last article date
n_articles int Number of articles in the event
source_cluster_id int Phase 1 cluster of origin
route str "A" (temporal segmentation) or "B" (atomic, bypass)
duration_days int Duration in days (end_date βˆ’ start_date)

validation_sample.csv β€” column reference

Column Type Description
micro_event_id str Micro-event identifier
n_articles int Number of articles
duration_days int Duration in days
label str JIT event label
representative_headline str Representative headline
remaining_headlines str Remaining headlines (pipe-separated)
annotation str Manual annotation: C = Correct, P = Partial, N = Non-event
notes str Free-text annotation notes

Key Statistics

Statistic Value
Total articles 13,831
Articles in valid micro-events 4,418 (31.9%)
Total micro-events 1,632
Articles / micro-event (mean) 2.71
Articles / micro-event (median) 2
Median event duration (Phase 1 clusters) 190 days
Median event duration (Phase 2 micro-events) 3 days
Duration reduction factor 63Γ—
Articles with CLIP embedding 12,713 (91.9%)
Unique image hashes 12,789
Time span 2024-2025
Language Spanish

Construction Pipeline

The dataset was built through a five-stage pipeline, each corresponding to a Jupyter notebook. All notebooks are written in English, except phase0_corpus_enrichment which was developed as a prior preprocessing step and is provided in Spanish for reproducibility.

Phase 0 β€” Corpus Enrichment (phase0_corpus_enrichment.ipynb)

Ingestion and enrichment of the raw corpus: text normalisation, NER with Stanza (β†’ named_entities), temporal expression extraction (β†’ date_mentions, extracted_dates), and DBpedia entity linking (β†’ named_entities_dbpedia).

Phase 1 β€” Semantic Micro-Clustering (phase1_semantic_clustering.ipynb)

BERTopic with HDBSCAN (min_cluster_size=6) over multilingual E5-small embeddings projected to 5d via UMAP. Noise articles rescued via Ward agglomerative clustering. Produces 3,577 labelled semantic clusters.

Quality metrics: $C_v = 0.62$, Silhouette (raw embeddings) $= 0.006$, intra/inter distance ratio $= 0.637$.

Phase 2 β€” Hybrid Temporal Segmentation (phase2_temporal_segmentation.ipynb)

Dual routing (Route A: β‰₯4 articles β†’ temporal segmentation; Route B: <4 β†’ atomic). Gaussian smoothing (Οƒ=0.75) + peak detection. Triple-criterion split validator: temporal gap β‰₯30 days (70.5% of splits), residual cosine dissimilarity (29.5%), named-entity Jaccard=0 (~0%). Produces 1,632 micro-events and the micro_event_id / event_label columns.

Phase 3 β€” CLIP Embeddings (phase3_clip_embeddings.ipynb)

CLIP ViT-B/32 embeddings computed once per unique MD5 image hash and broadcast to all articles sharing that hash. 12,713/13,831 articles have a valid embedding; the remaining 1,118 receive a zero vector and are excluded from image-only evaluations.

Baseline Retrieval (baseline_retrieval.ipynb)

Reproduces BM25, text-only, image-only, concat, and late-fusion retrieval baselines reported in the paper. Evaluation protocol: 500 sampled queries, MAP@5 and MAP@10.


Reproducing the Pipeline

The notebooks/ folder contains the five pipeline notebooks. The src/ folder contains the supporting Python modules imported by the notebooks.

Recommended environment: Google Colab (notebooks mount Google Drive automatically). To run locally, update the DATA_DIR path in Cell 1 of each notebook.

Dependencies (installed automatically by the notebooks via !pip install):

bertopic>=0.16
sentence-transformers>=2.2
gensim>=4.3
umap-learn>=0.5
hdbscan>=0.8
scipy>=1.10
scikit-learn>=1.2
rank-bm25>=0.2
open-clip-torch>=2.20
stanza>=1.6

Execution order: fase0 β†’ fase1 β†’ fase2 β†’ fase3 β†’ baseline_retrieval. fase0 only needs to be run once to generate the enriched corpus; the remaining notebooks load pre-computed artifacts from Drive.


Loading the Dataset

import pandas as pd
import numpy as np

# Article-level data
articles = pd.read_parquet("articles.parquet")

# Micro-event summary
events = pd.read_csv("micro_events.csv")

# Text embeddings β€” aligned 1:1 with articles (same row order)
text_emb = np.load("embeddings_e5_small.npy")        # shape: (13831, 384)

# Image embeddings β€” aligned 1:1 with articles (same row order)
clip_emb = np.load("embeddings_clip_articulos.npy")  # shape: (13831, 512)

# Filter only articles in valid micro-events
valid = articles[articles["micro_event_id"] != "-1"]  # 4,418 articles

Retrieval Baseline Results

System P@5 R@5 MAP@5 MAP@10
Random .0002 .0002 .0002 .0002
BM25 .1544 .3555 .2645 .2796
Text-only (E5-small) .0224 .0416 .0299 .0297
Image-only (CLIP) .0312 .0678 .0429 .0443
Concat (E5 + CLIP) .0372 .0710 .0485 .0514
Late fusion .0376 .0713 .0481 .0508

Manual Validation

A random sample of 50 micro-events was manually annotated:

Label Count %
Correct 13 26%
Partial 3 6%
Non-event 34 68%

The 68% non-event rate reflects the single-outlet nature of the corpus: recurring sections (weather, gastronomy, opinion columns, historical essays) are correctly grouped by topic but do not constitute discrete news events. The true clustering error rate (articles from distinct events merged) is only 14%.


Citation

Under review.


License

This dataset is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.

Downloads last month
98