Datasets:
subject stringlengths 8 8 | predicate stringclasses 11 values | object stringlengths 8 8 | object_type stringclasses 1 value | object_datatype stringclasses 0 values | object_language stringclasses 0 values |
|---|---|---|---|---|---|
00260881 | _hypernym | 00260622 | literal | null | null |
01332730 | _derivationally_related_form | 03122748 | literal | null | null |
06066555 | _derivationally_related_form | 00645415 | literal | null | null |
09322930 | _instance_hypernym | 09360122 | literal | null | null |
07193596 | _derivationally_related_form | 00784342 | literal | null | null |
01768969 | _derivationally_related_form | 02636811 | literal | null | null |
01455754 | _hypernym | 01974062 | literal | null | null |
07554856 | _hypernym | 07553301 | literal | null | null |
00057306 | _hypernym | 00056912 | literal | null | null |
10341660 | _derivationally_related_form | 02661252 | literal | null | null |
13219258 | _hypernym | 13167078 | literal | null | null |
01698271 | _also_see | 01754576 | literal | null | null |
10499355 | _hypernym | 10083823 | literal | null | null |
02103406 | _hypernym | 02084071 | literal | null | null |
07190941 | _hypernym | 07185325 | literal | null | null |
12090318 | _member_meronym | 12093769 | literal | null | null |
12213635 | _member_meronym | 12214245 | literal | null | null |
02651424 | _derivationally_related_form | 02672371 | literal | null | null |
10668450 | _hypernym | 10525134 | literal | null | null |
01837746 | _hypernym | 01342529 | literal | null | null |
04692908 | _derivationally_related_form | 01259005 | literal | null | null |
00848169 | _derivationally_related_form | 06719579 | literal | null | null |
10483138 | _derivationally_related_form | 00968211 | literal | null | null |
03631445 | _derivationally_related_form | 01521603 | literal | null | null |
08135342 | _hypernym | 08123167 | literal | null | null |
12219065 | _hypernym | 13112664 | literal | null | null |
00257269 | _hypernym | 00230746 | literal | null | null |
04216634 | _derivationally_related_form | 01460029 | literal | null | null |
07306252 | _derivationally_related_form | 01810447 | literal | null | null |
02261757 | _hypernym | 02261419 | literal | null | null |
08730550 | _member_meronym | 09733899 | literal | null | null |
04085873 | _derivationally_related_form | 01271658 | literal | null | null |
04337740 | _derivationally_related_form | 01410223 | literal | null | null |
03522863 | _hypernym | 03091374 | literal | null | null |
01781478 | _derivationally_related_form | 04826771 | literal | null | null |
12418065 | _hypernym | 11561228 | literal | null | null |
05034989 | _synset_domain_topic_of | 06037666 | literal | null | null |
09617161 | _derivationally_related_form | 06694149 | literal | null | null |
12319687 | _member_meronym | 12321077 | literal | null | null |
09809749 | _hypernym | 10317007 | literal | null | null |
11647131 | _hypernym | 11554175 | literal | null | null |
12493208 | _has_part | 12493426 | literal | null | null |
12526178 | _hypernym | 12205694 | literal | null | null |
01634424 | _hypernym | 01634142 | literal | null | null |
00692329 | _hypernym | 00690614 | literal | null | null |
02282082 | _derivationally_related_form | 04388743 | literal | null | null |
00561714 | _hypernym | 01157517 | literal | null | null |
06329313 | _derivationally_related_form | 00060477 | literal | null | null |
10065066 | _derivationally_related_form | 06159473 | literal | null | null |
13425637 | _derivationally_related_form | 00524299 | literal | null | null |
02519183 | _hypernym | 02518161 | literal | null | null |
00729108 | _derivationally_related_form | 00602805 | literal | null | null |
06718862 | _member_of_domain_usage | 09716439 | literal | null | null |
12108742 | _hypernym | 11744859 | literal | null | null |
00845909 | _derivationally_related_form | 10009671 | literal | null | null |
07439284 | _derivationally_related_form | 01901783 | literal | null | null |
09275473 | _has_part | 09012297 | literal | null | null |
03619396 | _derivationally_related_form | 02339413 | literal | null | null |
00226566 | _derivationally_related_form | 00374224 | literal | null | null |
07762244 | _hypernym | 07705931 | literal | null | null |
08969798 | _instance_hypernym | 08524735 | literal | null | null |
01024190 | _derivationally_related_form | 06333653 | literal | null | null |
09959387 | _hypernym | 09774783 | literal | null | null |
12191587 | _hypernym | 13109733 | literal | null | null |
07047804 | _synset_domain_topic_of | 07020895 | literal | null | null |
13820655 | _hypernym | 13819207 | literal | null | null |
08929922 | _member_of_domain_region | 13753430 | literal | null | null |
00452512 | _also_see | 01695567 | literal | null | null |
03376595 | _has_part | 04119892 | literal | null | null |
13624873 | _hypernym | 13616054 | literal | null | null |
10640620 | _derivationally_related_form | 01428853 | literal | null | null |
00680485 | _derivationally_related_form | 06211078 | literal | null | null |
10688356 | _derivationally_related_form | 06248968 | literal | null | null |
09795124 | _hypernym | 09875786 | literal | null | null |
09754051 | _derivationally_related_form | 00245289 | literal | null | null |
06162979 | _hypernym | 05726596 | literal | null | null |
04560113 | _hypernym | 04388743 | literal | null | null |
01456463 | _derivationally_related_form | 03044934 | literal | null | null |
07933799 | _hypernym | 07933274 | literal | null | null |
13477023 | _derivationally_related_form | 00545557 | literal | null | null |
12545232 | _hypernym | 13118707 | literal | null | null |
14323683 | _derivationally_related_form | 02121511 | literal | null | null |
02349212 | _derivationally_related_form | 13929852 | literal | null | null |
00242003 | _derivationally_related_form | 00346537 | literal | null | null |
01146039 | _hypernym | 01145359 | literal | null | null |
02497824 | _derivationally_related_form | 01185611 | literal | null | null |
03813704 | _synset_domain_topic_of | 08199025 | literal | null | null |
04060647 | _derivationally_related_form | 02107248 | literal | null | null |
15101586 | _derivationally_related_form | 02761685 | literal | null | null |
06158185 | _hypernym | 06153846 | literal | null | null |
10512562 | _derivationally_related_form | 01098452 | literal | null | null |
12834408 | _member_meronym | 12834671 | literal | null | null |
12850718 | _hypernym | 11579418 | literal | null | null |
00244625 | _derivationally_related_form | 03087366 | literal | null | null |
03003928 | _derivationally_related_form | 08703454 | literal | null | null |
00268112 | _hypernym | 00267522 | literal | null | null |
07825972 | _hypernym | 07810907 | literal | null | null |
09189411 | _has_part | 08759420 | literal | null | null |
03955296 | _derivationally_related_form | 01249490 | literal | null | null |
08081403 | _hypernym | 08208560 | literal | null | null |
WN18RR
Dataset Description
WordNet-based link prediction benchmark (improved) - derived from WN18 with test-set leakage removed
Original Source: https://figshare.com/ndownloader/files/21844185
Dataset Summary
This dataset contains RDF triples from WN18RR converted to HuggingFace dataset format for easy use in machine learning pipelines.
- Format: Originally tsv, converted to HuggingFace Dataset
- Size: 0.004 GB (extracted)
- Entities: 40,943
- Triples: 93,003
- Original License: Apache 2.0
Recommended Use
Lexical knowledge graph benchmarking, embedding evaluation
Notes\n\nStatic benchmark (2018). TSV format with pre-split train/valid/test files. Contains 11 relation types. Format: subjectrelationobject
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/wn18rr")
# 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/wn18rr", "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/wn18rr")
# 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: tsv
- Original Size: 0.004 GB
- Conversion Tool: CleverErnie RDF Pipeline
- Format Version: 1.0
- Conversion Date: 2025-11-06
Citation
If you use this dataset, please cite the original source:
Original Dataset: WN18RR URL: https://figshare.com/ndownloader/files/21844185 License: Apache 2.0
Dataset Preparation
This dataset was prepared using the CleverErnie GISM framework:
# Download original dataset
cleverernie download-dataset -d wn18rr
# Convert to HuggingFace format
python scripts/convert_rdf_to_hf_dataset.py \
datasets/wn18rr/[file] \
hf_datasets/wn18rr \
--format tsv
# Upload to HuggingFace Hub
python scripts/upload_all_datasets.py --dataset wn18rr
Additional Information
Original Source
https://figshare.com/ndownloader/files/21844185
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
- 29