subject string | predicate string | object string | object_type string | object_datatype string | object_language string |
|---|---|---|---|---|---|
http://wikiba.se/ontology#Dump | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://schema.org/Dataset | uri | null | null |
http://wikiba.se/ontology#Dump | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://www.w3.org/2002/07/owl#Ontology | uri | null | null |
http://wikiba.se/ontology#Dump | http://creativecommons.org/ns#license | http://creativecommons.org/publicdomain/zero/1.0/ | uri | null | null |
http://wikiba.se/ontology#Dump | http://schema.org/softwareVersion | 1.0.0 | literal | null | null |
http://wikiba.se/ontology#Dump | http://schema.org/dateModified | 2025-11-26T23:03:03+00:00 | literal | http://www.w3.org/2001/XMLSchema#dateTime | null |
http://wikiba.se/ontology#Dump | http://www.w3.org/2002/07/owl#imports | http://wikiba.se/ontology-1.0.owl | uri | null | null |
https://www.wikidata.org/wiki/Special:EntityData/Q31 | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://schema.org/Dataset | uri | null | null |
https://www.wikidata.org/wiki/Special:EntityData/Q31 | http://schema.org/about | http://www.wikidata.org/entity/Q31 | uri | null | null |
https://www.wikidata.org/wiki/Special:EntityData/Q31 | http://schema.org/version | 2434457700 | literal | http://www.w3.org/2001/XMLSchema#integer | null |
https://www.wikidata.org/wiki/Special:EntityData/Q31 | http://schema.org/dateModified | 2025-11-26T20:46:14+00:00 | literal | http://www.w3.org/2001/XMLSchema#dateTime | null |
http://www.wikidata.org/entity/Q31 | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://wikiba.se/ontology#Item | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P1082 | 11825551 | literal | http://www.w3.org/2001/XMLSchema#decimal | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P1667 | 1000063 | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct-normalized/P1667 | http://vocab.getty.edu/tgn/1000063 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P1151 | http://www.wikidata.org/entity/Q3247091 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P3348 | 2020 | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct-normalized/P3348 | http://data.nlg.gr/resource/authority/A2020 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P1333 | Point(5.47248 49.49699) | literal | http://www.opengis.net/ont/geosparql#wktLiteral | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P1546 | http://www.wikidata.org/entity/Q1308013 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P5125 | http://www.wikidata.org/entity/Q7112200 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P349 | 00560624 | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct-normalized/P349 | http://id.ndl.go.jp/auth/ndlna/00560624 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P38 | http://www.wikidata.org/entity/Q4916 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P3365 | belgio | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P3221 | destination/belgium | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P2581 | 00009714n | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct-normalized/P2581 | http://babelnet.org/rdf/s00009714n | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P1566 | 2802361 | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct-normalized/P1566 | https://sws.geonames.org/2802361/ | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P227 | 4005406-8 | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct-normalized/P227 | https://d-nb.info/gnd/4005406-8 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P487 | 🇧🇪 | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P1792 | http://www.wikidata.org/entity/Q7021332 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P2852 | http://www.wikidata.org/entity/Q1061257 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P2852 | http://www.wikidata.org/entity/Q25648793 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P2852 | http://www.wikidata.org/entity/Q25648794 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P2852 | http://www.wikidata.org/entity/Q25648798 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P3916 | concept893 | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct-normalized/P3916 | http://vocabularies.unesco.org/thesaurus/concept893 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P2853 | http://www.wikidata.org/entity/Q1378312 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P2853 | http://www.wikidata.org/entity/Q2335536 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P395 | B | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P3238 | 0 | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P1335 | Point(2.5452695664523 51.089449723914) | literal | http://www.opengis.net/ont/geosparql#wktLiteral | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P2633 | http://www.wikidata.org/entity/Q1115035 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P298 | BEL | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P1448 | Königreich Belgien | literal | null | de |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P1448 | Koninkrijk België | literal | null | nl |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P1448 | Royaume de Belgique | literal | null | fr |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P1313 | http://www.wikidata.org/entity/Q213107 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P3417 | Belgium | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P3417 | Belge | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P3529 | 31112 | literal | http://www.w3.org/2001/XMLSchema#decimal | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P417 | http://www.wikidata.org/entity/Q128267 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P998 | Regional/Europe/Belgium/ | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P486 | D001530 | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct-normalized/P486 | http://id.nlm.nih.gov/mesh/D001530 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P2959 | http://www.wikidata.org/entity/Q25929919 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P2959 | http://www.wikidata.org/entity/Q42311082 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P2959 | http://www.wikidata.org/entity/Q52884026 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P3106 | world/belgium | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P122 | http://www.wikidata.org/entity/Q41614 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P122 | http://www.wikidata.org/entity/Q3330103 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P982 | 5b8a5ee5-0bb3-34cf-9a75-c27c44e341fc | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct-normalized/P982 | http://musicbrainz.org/area/5b8a5ee5-0bb3-34cf-9a75-c27c44e341fc | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P1552 | http://www.wikidata.org/entity/Q3174312 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P94 | http://commons.wikimedia.org/wiki/Special:FilePath/Great%20coat%20of%20arms%20of%20Belgium.svg | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P2981 | B | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P2573 | 8330 | literal | http://www.w3.org/2001/XMLSchema#decimal | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P3422 | 99131 | literal | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P793 | http://www.wikidata.org/entity/Q223933 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P793 | http://www.wikidata.org/entity/Q1160895 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q32 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q38 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q183 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q347 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q408 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q212 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q1246 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q142 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q145 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q16 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q252 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q35 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q43 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q55 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q77 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q833 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q843 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q865 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q96 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q974 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q30 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q159 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q668 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q41 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q148 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q230 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q801 | uri | null | null |
http://www.wikidata.org/entity/Q31 | http://www.wikidata.org/prop/direct/P530 | http://www.wikidata.org/entity/Q29999 | uri | null | null |
Wikidata Truthy
Dataset Description
Core facts from Wikidata (preferred statements only)
Original Source: https://dumps.wikimedia.org/wikidatawiki/entities/latest-truthy.nt.bz2
Dataset Summary
This dataset contains RDF triples from Wikidata Truthy converted to HuggingFace dataset format for easy use in machine learning pipelines.
- Format: Originally ntriples, converted to HuggingFace Dataset
- Size: 100.0 GB (extracted)
- Entities: ~100M
- Triples: ~2B
- Original License: CC0 1.0
Recommended Use
Best general knowledge, production training, multilingual support
Notes: Most comprehensive general knowledge base, recommended for production. Now uses bz2 compression.
Dataset Format: Lossless RDF Representation
This dataset uses a standard lossless format for representing RDF (Resource Description Framework) data in HuggingFace Datasets. All semantic information from the original RDF knowledge graph is preserved, enabling perfect round-trip conversion between RDF and HuggingFace formats.
Schema
Each RDF triple is represented as a row with 6 fields:
| Field | Type | Description | Example |
|---|---|---|---|
subject |
string | Subject of the triple (URI or blank node) | "http://schema.org/Person" |
predicate |
string | Predicate URI | "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" |
object |
string | Object of the triple | "John Doe" or "http://schema.org/Thing" |
object_type |
string | Type of object: "uri", "literal", or "blank_node" |
"literal" |
object_datatype |
string | XSD datatype URI (for typed literals) | "http://www.w3.org/2001/XMLSchema#integer" |
object_language |
string | Language tag (for language-tagged literals) | "en" |
Example: RDF Triple Representation
Original RDF (Turtle):
<http://example.org/John> <http://schema.org/name> "John Doe"@en .
HuggingFace Dataset Row:
{
"subject": "http://example.org/John",
"predicate": "http://schema.org/name",
"object": "John Doe",
"object_type": "literal",
"object_datatype": None,
"object_language": "en"
}
Loading the Dataset
from datasets import load_dataset
# Load the dataset
dataset = load_dataset("CleverThis/wikidata-truthy")
# Access the data
data = dataset["data"]
# Iterate over triples
for row in data:
subject = row["subject"]
predicate = row["predicate"]
obj = row["object"]
obj_type = row["object_type"]
print(f"Triple: ({subject}, {predicate}, {obj})")
print(f" Object type: {obj_type}")
if row["object_language"]:
print(f" Language: {row['object_language']}")
if row["object_datatype"]:
print(f" Datatype: {row['object_datatype']}")
Converting Back to RDF
The dataset can be converted back to any RDF format (Turtle, N-Triples, RDF/XML, etc.) with zero information loss:
from datasets import load_dataset
from rdflib import Graph, URIRef, Literal, BNode
def convert_to_rdf(dataset_name, output_file="output.ttl", split="data"):
"""Convert HuggingFace dataset back to RDF Turtle format."""
# Load dataset
dataset = load_dataset(dataset_name)
# Create RDF graph
graph = Graph()
# Convert each row to RDF triple
for row in dataset[split]:
# Subject
if row["subject"].startswith("_:"):
subject = BNode(row["subject"][2:])
else:
subject = URIRef(row["subject"])
# Predicate (always URI)
predicate = URIRef(row["predicate"])
# Object (depends on object_type)
if row["object_type"] == "uri":
obj = URIRef(row["object"])
elif row["object_type"] == "blank_node":
obj = BNode(row["object"][2:])
elif row["object_type"] == "literal":
if row["object_datatype"]:
obj = Literal(row["object"], datatype=URIRef(row["object_datatype"]))
elif row["object_language"]:
obj = Literal(row["object"], lang=row["object_language"])
else:
obj = Literal(row["object"])
graph.add((subject, predicate, obj))
# Serialize to Turtle (or any RDF format)
graph.serialize(output_file, format="turtle")
print(f"Exported {len(graph)} triples to {output_file}")
return graph
# Usage
graph = convert_to_rdf("CleverThis/wikidata-truthy", "reconstructed.ttl")
Information Preservation Guarantee
This format preserves 100% of RDF information:
- ✅ URIs: Exact string representation preserved
- ✅ Literals: Full text content preserved
- ✅ Datatypes: XSD and custom datatypes preserved
(e.g.,
xsd:integer,xsd:dateTime) - ✅ Language Tags: BCP 47 language tags preserved (e.g.,
@en,@fr,@ja) - ✅ Blank Nodes: Node structure preserved (identifiers may change but graph isomorphism maintained)
Round-trip guarantee: Original RDF → HuggingFace → Reconstructed RDF produces semantically identical graphs.
Querying the Dataset
You can filter and query the dataset like any HuggingFace dataset:
from datasets import load_dataset
dataset = load_dataset("CleverThis/wikidata-truthy")
# Find all triples with English literals
english_literals = dataset["data"].filter(
lambda x: x["object_type"] == "literal" and x["object_language"] == "en"
)
print(f"Found {len(english_literals)} English literals")
# Find all rdf:type statements
type_statements = dataset["data"].filter(
lambda x: "rdf-syntax-ns#type" in x["predicate"]
)
print(f"Found {len(type_statements)} type statements")
# Convert to Pandas for analysis
import pandas as pd
df = dataset["data"].to_pandas()
# Analyze predicate distribution
print(df["predicate"].value_counts())
Dataset Format
The dataset contains all triples in a single data split, suitable for machine learning tasks such as:
- Knowledge graph completion
- Link prediction
- Entity embedding
- Relation extraction
- Graph neural networks
Format Specification
For complete technical documentation of the RDF-to-HuggingFace format, see:
📖 RDF to HuggingFace Format Specification
The specification includes:
- Detailed schema definition
- All RDF node type mappings
- Performance benchmarks
- Edge cases and limitations
- Complete code examples
Conversion Metadata
- Source Format: ntriples
- Original Size: 100.0 GB
- Conversion Tool: CleverErnie RDF Pipeline
- Format Version: 1.0
- Conversion Date: 2025-12-07
Citation
If you use this dataset, please cite the original source:
Original Dataset: Wikidata Truthy URL: https://dumps.wikimedia.org/wikidatawiki/entities/latest-truthy.nt.bz2 License: CC0 1.0
Dataset Preparation
This dataset was prepared using the CleverErnie GISM framework:
# Download original dataset
python scripts/rdf_dataset_downloader.py wikidata-truthy -o datasets/
# Convert to HuggingFace format
python scripts/convert_rdf_to_hf_dataset.py \
datasets/wikidata-truthy/[file] \
hf_datasets/wikidata-truthy \
--format nt
# Upload to HuggingFace Hub
python scripts/upload_all_datasets.py --dataset wikidata-truthy
Additional Information
Original Source
https://dumps.wikimedia.org/wikidatawiki/entities/latest-truthy.nt.bz2
Conversion Details
- Converted using: CleverErnie GISM
- Conversion script:
scripts/convert_rdf_to_hf_dataset.py - Dataset format: Single 'data' split with all triples
Maintenance
This dataset is maintained by the CleverThis organization.
- Downloads last month
- 362