Datasets:
language:
- nl
license: cc-by-sa-4.0
task_categories:
- text-classification
- question-answering
- text-generation
- feature-extraction
tags:
- schema-org
- knowledge-graph
- wikipedia
- dutch
- text2kg
- named-entity-recognition
- relation-extraction
- semantic-search
pretty_name: Schema.org Dutch Wikipedia Aligned Articles
size_categories:
- 10K<n<100K
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- split: validation
path: data/validation-*
dataset_info:
features:
- name: id
dtype: int64
- name: class_label
dtype: string
- name: wiki_id
dtype: string
- name: wiki_url
dtype: string
- name: wiki_title
dtype: string
- name: wiki_full_text
dtype: string
- name: context_paragraph
dtype: string
- name: keyword_count
dtype: int64
- name: keywords_used
dtype: string
splits:
- name: train
num_bytes: 76000000
num_examples: 10094
- name: validation
num_bytes: 19000000
num_examples: 2526
download_size: 95000000
dataset_size: 95000000
Dutch Wikipedia Aligned Articles aligned with Schema.org Classes
Dataset Version: 1.0 (2025-06-04)
Point of Contact: UWV Netherlands (UWV organization on Hugging Face)
License: CC BY-SA 4.0
Dataset: UWV/wim_schema_org_wiki_articles
Dataset Description
This dataset provides alignments between Schema.org classes and relevant Dutch Wikipedia articles. Each Schema.org class from a processed subset is linked to up to 20 distinct Wikipedia articles, including their full text, a context-relevant paragraph, and the keywords used for matching. The primary goal is to create a comprehensive resource for training models that map natural language text (Dutch Wikipedia) to structured knowledge graphs (Schema.org).
Dataset Splits: The dataset includes stratified train/validation splits (80/20) ensuring each Schema.org class is proportionally represented in both splits. Classes with 20 articles have 16 in training and 4 in validation.
Motivation and Intended Use
Primary Purpose: To serve as a base dataset for constructing training data for text-to-knowledge-graph (Text2KG) models. The dataset aims for extensive coverage of Schema.org classes, providing multiple textual examples (Wikipedia articles) for each class.
Intended Uses:
- Training and evaluation of models for:
- Knowledge graph construction from text.
- Named Entity Recognition (NER) and Typing against the Schema.org ontology.
- Relation Extraction (RE) based on Schema.org properties.
- Developing semantic search systems that use Schema.org structures.
- Cross-lingual information retrieval research (Schema.org as an interlingua).
- Building and augmenting Dutch knowledge bases aligned with a standard ontology.
Dataset Usage
from datasets import load_dataset
# Load the dataset with train/validation splits
dataset = load_dataset("UWV/wim_schema_org_wiki_articles")
# Access the splits
train_data = dataset["train"]
val_data = dataset["validation"]
print(f"Training examples: {len(train_data):,}")
print(f"Validation examples: {len(val_data):,}")
# Example: Get first record from training set
example = train_data[0]
print(f"Schema.org class: {example['class_label']}")
print(f"Wikipedia article: {example['wiki_title']}")
print(f"Context: {example['context_paragraph'][:200]}...")
# The dataset is pre-split and ready for training
from transformers import Trainer
# No need to manually split - use dataset["train"] and dataset["validation"]
How the Dataset Was Built
The dataset was constructed through an automated pipeline:
- Schema Definition Processing: Schema.org classes were extracted from the
schema.ttl
vocabulary file and processed into a structured SQLite database (schema_definitions.db
), with each class represented by its URI, label, comments, and properties in YAML format. - Keyword Generation: For each Schema.org class, its YAML definition was provided to an Azure OpenAI model (GPT-4o based) to generate a concise set of 1-3 relevant Dutch keywords.
- Wikipedia Article Retrieval: The Dutch Wikipedia dump (config
20231101.nl
from Hugging Facewikimedia/wikipedia
) was loaded into an in-memory DuckDB instance. For each class, this database was queried using the generated Dutch keywords to find candidate articles. - Iterative Matching and Filtering:
- A multi-pass approach was employed. In each pass, the system attempted to find and save one new, unique Wikipedia article for every Schema.org class that had not yet reached the target of 20 articles.
- URL Exclusion: To ensure diversity and find new articles in subsequent searches for the same class (within a pass or across passes), Wikipedia URLs already present in
schema_wiki_matches.db
for that class were excluded from new DuckDB queries. - LLM Relevance Ranking: Candidate articles from DuckDB were presented to an Azure OpenAI model. The model was tasked with selecting the single most relevant article based on the Schema.org class definition and the article's content (title, initial text, and keyword-rich snippets).
- Retry Mechanisms:
- If the LLM failed to select an article from an abundant set of candidates (≥12), the Wikipedia query was re-executed with the same keywords but ordered differently (
ORDER BY RANDOM()
) to obtain a new sample for LLM evaluation. - If the LLM still failed, or if initial Wikipedia results were sparse, new Dutch keywords were generated (up to a set number of attempts per class per pass), avoiding terms semantically similar to previously tried ones for that class.
- If the LLM failed to select an article from an abundant set of candidates (≥12), the Wikipedia query was re-executed with the same keywords but ordered differently (
- Data Storage: Matched pairs, along with article metadata (ID, URL, title, full text), the most relevant context paragraph, keyword count in that paragraph, and keywords used for the search, were stored in the
schema_wiki_matches.db
SQLite database. - Stratified Splitting: Records were split into training (80%) and validation (20%) sets using stratified sampling to ensure each Schema.org class is proportionally represented in both splits with seed 42 for reproducibility.
Dataset Structure
The dataset contains the following fields:
Field | Type | Description |
---|---|---|
id |
int | Original database identifier (preserved from source SQLite) |
class_label |
string | Schema.org class label (e.g., "Restaurant", "Person") |
wiki_id |
string | Wikipedia article ID |
wiki_url |
string | Full URL to the Dutch Wikipedia article |
wiki_title |
string | Title of the Wikipedia article |
wiki_full_text |
string | Complete text content of the Wikipedia article |
context_paragraph |
string | Most relevant paragraph containing keywords |
keyword_count |
int | Number of keyword instances in context paragraph |
keywords_used |
string | Dutch keywords used for matching (comma-separated) |
Dataset Splits:
- Training (80%): ~10,096 examples from all 634 Schema.org classes
- Validation (20%): ~2,524 examples from all 634 Schema.org classes
- Stratification: Each class maintains 80/20 split ratio (e.g., classes with 20 articles have 16 train, 4 validation)
Dataset Statistics
Key Statistics
- Total Schema.org Classes Processed: 634
- Classes with ≥1 Wikipedia Match: 634 (100.0% coverage of processed classes)
- Total Unique Dutch Wikipedia Articles Linked: 12,620
- Average Articles per Class: 19.91
- Train/Validation Split: Stratified 80/20 with seed 42
Split Distribution:
- Training Set: 10,096 examples (80.0%)
- Validation Set: 2,524 examples (20.0%)
- Classes in both splits: 634 (except classes with only 1 example)
Distribution of Articles per Class: The dataset shows a strong tendency for classes to have the maximum target of 20 articles.
- Classes with 20 articles: 627 (98.9%) → 16 train, 4 validation each
- Classes with 19 articles: 1 (0.2%) → 15 train, 4 validation
- Classes with 14 articles: 1 (0.2%) → 11 train, 3 validation
- Classes with 13 articles: 1 (0.2%) → 10 train, 3 validation
- Classes with 9 articles: 3 (0.5%) → 7 train, 2 validation each
- Classes with 7 articles: 1 (0.2%) → 5 train, 2 validation
Example Applications
Knowledge Graph Construction:
# Train a model to recognize Schema.org entities
from transformers import AutoTokenizer, AutoModelForTokenClassification, Trainer
# Load the dataset
dataset = load_dataset("UWV/wim_schema_org_wiki_articles")
# Use the pre-split data directly
train_dataset = dataset["train"]
eval_dataset = dataset["validation"]
# Example: Entity classification training
for batch in train_dataset:
schema_class = batch["class_label"]
text_content = batch["context_paragraph"]
# Train models to recognize schema_class entities in text_content
Semantic Search with Schema.org Classes:
# Build class-specific embeddings
class_examples = {}
for split in ["train", "validation"]:
for row in dataset[split]:
class_label = row["class_label"]
if class_label not in class_examples:
class_examples[class_label] = {"train": [], "val": []}
class_examples[class_label][split.replace("validation", "val")].append(
row["context_paragraph"]
)
Limitations
- Source of Classes: The 634 classes represent those available and processed from the
schema_definitions.db
, which itself is derived fromschema.ttl
. This may not represent the entirety of all classes in the complete, live Schema.org vocabulary at any given time. - Match Quality: The relevance of Wikipedia articles is determined by LLM judgments, which, while generally reliable, are not infallible and can be influenced by prompt design and model characteristics.
- Keyword Dependency: The process depends on LLM-generated keywords. Suboptimal keywords might lead to less relevant or missed article matches.
- Wikipedia Snapshot: The dataset uses a specific snapshot of Dutch Wikipedia (
20231101.nl
). Content availability and article quality may vary. - Language Scope: Limited to Dutch Wikipedia articles, which may not provide uniform coverage for all Schema.org classes.
- Temporal Bias: Wikipedia content reflects knowledge up to the snapshot date, potentially omitting recent developments.
- Split Limitations: Classes with only one example appear exclusively in the training set. Very small classes may have imbalanced split ratios.
Citation
If you use this dataset in your research, please cite:
@dataset{wim_schema_org_wiki_articles,
title={Schema.org - Dutch Wikipedia Aligned Articles},
author={UWV Netherlands},
year={2025},
publisher={Hugging Face},
url={https://huggingface.co/datasets/UWV/wim_schema_org_wiki_articles}
}
License
This dataset is released under CC BY-SA 4.0 license, consistent with Wikipedia's licensing terms. The Schema.org vocabulary is available under CC BY-SA 3.0 license.
Acknowledgments
- Schema.org community for the ontology
- Wikimedia Foundation for Dutch Wikipedia content