COVERED-data / README.md
wikis2t's picture
Upload README.md with huggingface_hub
42721af verified
|
Raw History Blame Contribute Delete
3.76 kB
metadata
license: cc-by-sa-4.0
language:
  - en
task_categories:
  - text-generation
tags:
  - relation-extraction
  - wikidata
  - wikipedia
  - knowledge-graph
  - information-extraction
size_categories:
  - 1M<n<10M
configs:
  - config_name: default
    data_files:
      - split: train
        path: train.jsonl
      - split: validation
        path: valid.jsonl
      - split: test
        path: test.jsonl

COVERED-data

COVERED aligns Wikipedia sentences with Wikidata triples for benchmarking generative relation extraction. It is built with the WikiS2T framework.

Statistics

Split Sentences Triples Entities Relations
all 2,382,570 4,863,548 307,146 1,139
train 1,909,789 3,898,094 245,716 1,106
valid 238,719 485,865 30,713 746
test 234,062 479,589 30,717 752

The split is done at the entity level and stratified by category (80/10/10, seed 42). All sentences of an entity are in the same split.

Categories

17 Wikidata categories (selected by P31 instance of): 12 general and 5 domain-specific, sorted by number of sentences.

Category Group Entities Sentences Triples Sentences per entity
human general 27,919 1,068,288 2,099,478 38.26
film general 27,119 281,062 679,600 10.36
album general 25,163 176,853 378,261 7.03
river general 28,082 151,683 314,948 5.40
literary_work general 26,037 126,154 286,555 4.85
business general 24,951 120,977 200,681 4.85
building general 17,921 74,550 124,268 4.16
taxon domain-specific 24,434 69,757 137,885 2.85
organization general 18,053 63,992 100,237 3.54
mountain general 24,953 63,734 141,636 2.55
human_settlement general 25,247 46,661 107,502 1.85
painting general 9,057 42,498 112,950 4.69
street general 4,114 29,171 52,359 7.09
chemical domain-specific 8,523 24,386 39,200 2.86
gene domain-specific 9,443 22,341 52,554 2.37
asteroid domain-specific 4,183 13,391 23,310 3.20
star domain-specific 1,947 7,072 12,124 3.63
All 307,146 2,382,570 4,863,548 7.76

Format

One JSON object per line, one sentence per object.

{
  "category": "album",
  "entity": "Q100234970_Utopia",
  "sentence_id": "1_0",
  "sentence": "Utopia is the fourth studio album by American rapper Travis Scott.",
  "triples": [
    {"hop": 1, "triple_index": 11, "subject_id": "Q100234970", "subject_label": "Utopia",
     "predicate_id": "P175", "predicate_label": "performer",
     "object_id": "Q13605596", "object_label": "Travis Scott"},
    {"hop": 2, "subject_id": "Q13605596", "subject_label": "Travis Scott",
     "predicate_id": "P106", "predicate_label": "occupation",
     "object_id": "Q2252262", "object_label": "rapper", "via_object_id": "Q13605596"}
  ]
}
Field Meaning
category One of the 17 categories above
entity Source entity, <QID>_<title>
sentence_id Sentence index in the entity's article
sentence Wikipedia sentence
triples[].hop 1: subject is the source entity. 2: subject is an entity object of a 1-hop triple aligned to this sentence
triples[].subject_id, predicate_id, object_id Wikidata ids
triples[].*_label English labels
triples[].object_id Empty string for literal objects (dates, quantities, text); the literal value is in object_label
triples[].via_object_id 2-hop only: the entity through which the triple is reached

License

The sentences come from Wikipedia and are released under CC BY-SA 4.0. Wikidata triples are CC0.