Dataset Viewer
The dataset viewer is not available for this dataset.
Cannot get the config names for the dataset.
Error code:   ConfigNamesError
Exception:    FileNotFoundError
Message:      Couldn't find any data file at /src/services/worker/Juanillaberia/event-article-pairs. Couldn't find 'Juanillaberia/event-article-pairs' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/Juanillaberia/event-article-pairs@7c21ea0ab014799b9ffadb687a29a016daca121a/train.jsonl' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.ndjson', '.parquet', '.geoparquet', '.gpq', '.arrow', '.txt', '.conll', '.conllu', '.tar', '.xml', '.hdf5', '.h5', '.eval', '.toml', '.md', '.lance', '.tsfile', '.vortex', '.fa', '.fasta', '.fna', '.ffn', '.faa', '.frn', '.afa', '.gb', '.gbk', '.genbank', '.fq', '.fastq', '.pdb', '.ent', '.cif', '.mmcif', '.PDB', '.ENT', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.3gp', '.3g2', '.avi', '.asf', '.flv', '.mp4', '.mov', '.m4v', '.mkv', '.webm', '.f4v', '.wmv', '.wma', '.ogm', '.mxf', '.nut', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.3GP', '.3G2', '.AVI', '.ASF', '.FLV', '.MP4', '.MOV', '.M4V', '.MKV', '.WEBM', '.F4V', '.WMV', '.WMA', '.OGM', '.MXF', '.NUT', '.glb', '.ply', '.stl', '.GLB', '.PLY', '.STL', '.pdf', '.PDF', '.nii', '.NII', '.zip', '.idx', '.manifest', '.txn']
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response
                  config_names = get_dataset_config_names(
                      path=dataset,
                      token=hf_token,
                  )
                File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 161, in get_dataset_config_names
                  dataset_module = dataset_module_factory(
                      path,
                  ...<4 lines>...
                      **download_kwargs,
                  )
                File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 1178, in dataset_module_factory
                  raise FileNotFoundError(
                  ...<2 lines>...
                  ) from None
              FileNotFoundError: Couldn't find any data file at /src/services/worker/Juanillaberia/event-article-pairs. Couldn't find 'Juanillaberia/event-article-pairs' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/Juanillaberia/event-article-pairs@7c21ea0ab014799b9ffadb687a29a016daca121a/train.jsonl' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.ndjson', '.parquet', '.geoparquet', '.gpq', '.arrow', '.txt', '.conll', '.conllu', '.tar', '.xml', '.hdf5', '.h5', '.eval', '.toml', '.md', '.lance', '.tsfile', '.vortex', '.fa', '.fasta', '.fna', '.ffn', '.faa', '.frn', '.afa', '.gb', '.gbk', '.genbank', '.fq', '.fastq', '.pdb', '.ent', '.cif', '.mmcif', '.PDB', '.ENT', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.3gp', '.3g2', '.avi', '.asf', '.flv', '.mp4', '.mov', '.m4v', '.mkv', '.webm', '.f4v', '.wmv', '.wma', '.ogm', '.mxf', '.nut', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.3GP', '.3G2', '.AVI', '.ASF', '.FLV', '.MP4', '.MOV', '.M4V', '.MKV', '.WEBM', '.F4V', '.WMV', '.WMA', '.OGM', '.MXF', '.NUT', '.glb', '.ply', '.stl', '.GLB', '.PLY', '.STL', '.pdf', '.PDF', '.nii', '.NII', '.zip', '.idx', '.manifest', '.txn']

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.

Spanish News Same-Event Pairs (Event-Isolated)

A dataset of Spanish news article pairs labeled for whether they describe the same real-world event. Designed specifically for training cross-encoder rerankers in event-clustering pipelines, with strict event isolation across splits and a hard-negative mining strategy that approximates the candidate distribution seen at inference time.


Dataset summary

Split Pairs Positives Negatives Pos rate Neg:Pos
train 20,603 4,123 16,480 20.0% 4.00
validation 4,455 892 3,563 20.0% 3.99
test 4,445 889 3,556 20.0% 4.00
  • Language: Spanish (es)
  • Task: Binary text-pair classification — 1 = same event, 0 = different event
  • Total pairs: 29,503
  • Unique events: 643 (train: 451 / val: 96 / test: 96)
  • Unique articles: ~3,000

Intended use

The intended downstream task is binary classification on news article pairs, typically as the reranker stage in an event-clustering pipeline:

  1. A bi-encoder retrieves candidate pairs from a corpus by semantic similarity.
  2. A cross-encoder (trained on this dataset) scores the candidates and decides which to merge.

The negative mining strategy specifically mimics this candidate distribution: most negatives are hard (top-K nearest neighbors that aren't the same event), so models trained on this data learn to make fine-grained discriminations rather than relying on shallow cues.

Not suitable for:

  • Languages other than Spanish.
  • Domains other than news (legal, scientific, conversational text).
  • Training bi-encoders (use the original article corpus directly with contrastive losses; the pairs format here is for cross-encoder consumption).
  • Standalone "are these two arbitrary texts related?" tasks — the negative distribution is calibrated for news event clustering specifically.

Dataset structure

Data fields

Each row is one article pair (JSON Lines format):

Field Type Description
title_a string Title of article A
content_a string Body text of article A
title_b string Title of article B
content_b string Body text of article B
label int 1 if same event, 0 if different
source string Provenance of the pair (see "Negative sources" below)
anchor_url string URL of article A
candidate_url string URL of article B
anchor_event_id string Event ID of article A
candidate_event_id string Event ID of article B
sim float or null Cosine similarity from the mining bi-encoder (null for positives and random negatives)
date_gap_days int or null Absolute days between publication dates (null if either article has no parseable date)
topic_a string Topic label of article A's event
topic_b string Topic label of article B's event
publisher_a string Publisher of article A
publisher_b string Publisher of article B

source values

source label Meaning
positive 1 Two articles from the same event (intra-event pair)
hard_knn 0 Top-K bi-encoder neighbor that turned out to be a different event
hard_knn_entity 0 Top-K neighbor that is also an entity-overlap pair
entity_only 0 Different-event pair sharing a top PER/LOC entity, but not in the top-K
random 0 Random cross-event pair
random_sameday 0 Random cross-event pair from the same publication day (temporal-diversity floor)
random_fill 0 Random cross-event pair sampled to fill a quota shortfall

Example row

{
  "title_a": "...",
  "content_a": "...",
  "title_b": "...",
  "content_b": "...",
  "label": 0,
  "source": "hard_knn",
  "anchor_url": "https://...",
  "candidate_url": "https://...",
  "anchor_event_id": "evt_00123",
  "candidate_event_id": "evt_00987",
  "sim": 0.8421,
  "date_gap_days": 2,
  "topic_a": "politics",
  "topic_b": "politics",
  "publisher_a": "Infobae",
  "publisher_b": "Clarin.com"
}

Dataset construction

The dataset was built by a 5-stage pipeline from a source corpus of Spanish news events, where each event groups multiple articles covering the same real-world incident (events were pre-clustered upstream; this dataset starts from that clustering).

Pipeline overview

  1. Filter + split — Drop articles with no cached content; drop events with fewer than 2 surviving articles; deduplicate URLs globally. Stratify remaining events by topic and split 70/15/15 (train/val/test) at the event level, so no event spans splits.
  2. Embed — Encode each article as "query: {title}\n\n{content}" with intfloat/multilingual-e5-large; L2-normalize.
  3. Mine candidates — Per split, compute top-K (K=30) nearest neighbors by cosine similarity. Tag each as same-event / hard / entity-overlap / etc. Also emit cross-event entity-overlap candidates outside the top-K.
  4. Build pairs — Positives: all intra-event combinations. Negatives: target ratio 4:1 (neg:pos), mixed 60% hard_knn / 20% entity_only / 20% random, with a 5% same-day floor for temporal diversity. Symmetric pair duplicates removed.
  5. Distribution report — Audit splits for event isolation, label balance, publisher concentration, and date-gap distribution.

Negative mix

Bucket Share Rationale
hard_knn (+ hard_knn_entity) 60% Top-K bi-encoder neighbors — pairs that look very similar in embedding space but aren't the same event. Forces fine-grained discrimination.
entity_only 20% Shared person or place entity but different event. Prevents the model from learning "shared entity = same event" as a shortcut.
random / random_fill / random_sameday 20% Baseline negatives plus a 5% same-day floor for temporal hard negatives.

Guardrails

  • Event isolation: 0 events shared between any pair of splits.
  • URL isolation: 0 URLs shared between any pair of splits.
  • Cross-split contamination: 0 pairs reference an event outside their own split.
  • Publisher-pair cap: No single publisher pair contributes more than 8% of any split's positives (top observed: ~1.5%).
  • Same-day negatives: 14.6–15.5% per split (above the 5% floor).
  • No unknown-date negatives: every row in negatives has a parseable date.

These can be re-verified by running an audit cell on the published splits — see "Verifying the splits" below.


Recommended preprocessing

Symmetry augmentation (train only)

A cross-encoder receives [CLS] a [SEP] b [SEP], and position matters. Since "same event" is a symmetric relation, mirroring each training row improves order-invariance:

import pandas as pd

train_swapped = pd.DataFrame({
    "title_a":   train_df["title_b"].values,
    "content_a": train_df["content_b"].values,
    "title_b":   train_df["title_a"].values,
    "content_b": train_df["content_a"].values,
    "label":     train_df["label"].values,
    "source":    train_df["source"].values,
})
train_augmented = pd.concat([train_df, train_swapped], ignore_index=True)
train_augmented = train_augmented.sample(frac=1, random_state=42).reset_index(drop=True)

Do not augment validation or test — it inflates metrics with correlated rows.

After augmentation: ~41,206 training rows.

Loading

from datasets import load_dataset

ds = load_dataset("your-username/spanish-news-same-event-pairs")

print(ds)
# DatasetDict({
#   train:      Dataset({ num_rows: 20603, ... })
#   validation: Dataset({ num_rows:  4455, ... })
#   test:       Dataset({ num_rows:  4445, ... })
# })

Tokenization for a cross-encoder

from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("BSC-LT/MrBERT-es")

def tokenize(batch, max_length=4096):
    text_a = [f"{t}\n\n{c}" for t, c in zip(batch["title_a"], batch["content_a"])]
    text_b = [f"{t}\n\n{c}" for t, c in zip(batch["title_b"], batch["content_b"])]
    return tokenizer(text_a, text_b, padding=False, truncation=True, max_length=max_length)

tokenized = ds.map(tokenize, batched=True)

Verifying the splits

To re-confirm event isolation and label balance after loading the dataset:

import json
from collections import Counter
from datasets import load_dataset

ds = load_dataset("your-username/spanish-news-same-event-pairs")

# Label balance
for split in ds:
    labels = Counter(ds[split]["label"])
    pos, neg = labels.get(1, 0), labels.get(0, 0)
    print(f"{split:11s} pos={pos:>5} neg={neg:>6} neg:pos={neg/max(pos,1):.2f}")

# Event isolation
events = {
    s: set(ds[s]["anchor_event_id"]) | set(ds[s]["candidate_event_id"])
    for s in ds
}
splits = list(events)
for i, s1 in enumerate(splits):
    for s2 in splits[i+1:]:
        overlap = len(events[s1] & events[s2])
        print(f"{s1} vs {s2}: event overlap = {overlap}")

Expected: neg:pos ~ 4.00 and event overlap = 0 everywhere.


Source data

  • Articles: Spanish-language news articles scraped from a fixed set of publishers (e.g. Clarin.com, Infobae, La Nacion, Pagina|12, TN, and others).
  • Events: Pre-clustered upstream of this dataset; each event_id corresponds to a real-world event with multiple covering articles.
  • Entities: Top PER/LOC mentions per event, used for the entity-overlap negative mining bucket.
  • Embeddings (for mining only): intfloat/multilingual-e5-large with the "query: ..." prefix and L2-normalization. Embeddings themselves are not published — only the resulting pairs.

Considerations for use

Strengths

  • Honest evaluation. Event-isolated splits mean a model can't memorize answers from train. Held-out metrics reflect genuine generalization to unseen events.
  • Production-aligned negatives. Hard-negative mining matches the candidate distribution a deployed reranker actually sees, so val/test PR-AUC is a better proxy for production quality than random-negative datasets.
  • Provenance preserved. Every row records its source bucket, so you can stratify metrics by negative difficulty (e.g. PR-AUC on hard_knn vs random separately).

Limitations

  • Spanish news only. Other languages or domains are out of scope. Cross-lingual generalization is untested.
  • Publisher coverage is finite. A fixed set of outlets contributes most of the data. Models may behave unexpectedly on articles from publishers not represented in training.
  • Temporal scope is bounded. Articles come from a specific date range. Events from very different time periods (different vocabulary, different named entities) may be harder.
  • Source clustering is upstream. Event labels were produced by a prior clustering process and inherit whatever errors that process made. Per-pair label noise is non-zero, especially for events with sparse coverage.
  • 20% positive prior. This is the mining prior, not the production prior. If deploying against a stream with a different positive rate, recalibrate decision thresholds accordingly.
  • No content normalization. Raw scraped article text is preserved (boilerplate, ads, navigation residue may be present). This is intentional — the model learns to handle the noise it'll see in production — but users wanting cleaner text should normalize themselves.

Ethical considerations

The dataset contains content scraped from public news outlets. Article text is reproduced verbatim. Users redistributing or deriving works from this dataset should respect the source publishers' terms of use and applicable copyright law. The dataset is provided for research and model-training purposes.


Citation

If you use this dataset, please cite:

@misc{spanish-news-same-event-pairs,
  author       = {Juan Illaberia},
  title        = {Spanish News Same-Event Pairs (Event-Isolated)},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/datasets/your-username/spanish-news-same-event-pairs}},
}

Please also cite the embedding model used for hard-negative mining:

@article{wang2024multilinguale5,
  title  = {Multilingual E5 Text Embeddings: A Technical Report},
  author = {Wang, Liang and Yang, Nan and Huang, Xiaolong and others},
  year   = {2024},
}
Downloads last month
1

Collection including Juanillaberia/event-article-pairs