language:
- en
license:
- other
multilinguality:
- monolingual
size_categories:
- n<1K
pretty_name: relbert/t_rex
Dataset Card for "relbert/t_rex"
Dataset Description
- Repository: https://hadyelsahar.github.io/t-rex/
- Paper: https://aclanthology.org/L18-1544/
- Dataset: Cleaned T-REX for link prediction.
Dataset Summary
This is the T-REX dataset proposed in https://aclanthology.org/L18-1544/. The test split is universal across different version, which is manually checked by the author of relbert/t_rex, and the test split contains predicates that is not included in the train/validation split. The train/validation splits are created for each configuration by the ratio of 9:1. The number of triples in each split is summarized in the table below.
Note: To make it consistent with other datasets (nell and conceptnet), we rename predicate/subject/object as relation/head/tail.
- Number of instances (
filter_unified.min_entity_4_max_predicate_10
)
train | validation | test | |
---|---|---|---|
number of pairs | 603 | 68 | 122 |
number of unique relation types | 157 | 52 | 34 |
Filtering to Remove Noise
We apply filtering to keep triples with named-entities in either of head or tail (named-entity filter
).
Then, we remove predicates if they have less than three triples (rare-predicate filter
).
After the filtering, we manually remove too vague and noisy predicate, and unify same predicates with different names (see the annotation here).
Dataset | raw |
named-entity filter |
rare-predicate |
unify-denoise-predicate |
---|---|---|---|---|
Triples | 20,877,472 | 12,561,573 | 12,561,250 | 432,781 |
Predicate | 1,616 | 1,470 | 1,237 | 246 |
Filtering to Purify the Dataset
We reduce the size of the dataset by applying filtering based on the number of predicates and entities in the triples.
We first remove triples that contain either of subject or object with the occurrence in the dataset that is lower than min entity
.
Then, we reduce the number triples in each predicate to be less than max predicate
.
If the number of triples in a predicate is higher than max predicate
,
we choose top-max predicate
triples based on the frequency of the subject and the object, or random sampling.
- distribution of entities
- distribution of predicates
Dataset Structure
An example looks as follows.
{
"tail": "Persian",
"head": "Tajik",
"title": "Tandoor bread",
"text": "Tandoor bread (Arabic: \u062e\u0628\u0632 \u062a\u0646\u0648\u0631 khubz tannoor, Armenian: \u0569\u0578\u0576\u056b\u0580 \u0570\u0561\u0581 tonir hats, Azerbaijani: T\u0259ndir \u00e7\u00f6r\u0259yi, Georgian: \u10d7\u10dd\u10dc\u10d8\u10e1 \u10de\u10e3\u10e0\u10d8 tonis puri, Kazakh: \u0442\u0430\u043d\u0434\u044b\u0440 \u043d\u0430\u043d tandyr nan, Kyrgyz: \u0442\u0430\u043d\u0434\u044b\u0440 \u043d\u0430\u043d tandyr nan, Persian: \u0646\u0627\u0646 \u062a\u0646\u0648\u0631\u06cc nan-e-tanuri, Tajik: \u043d\u043e\u043d\u0438 \u0442\u0430\u043d\u0443\u0440\u0439 noni tanuri, Turkish: Tand\u0131r ekme\u011fi, Uyghur: ) is a type of leavened bread baked in a clay oven called a tandoor, similar to naan. In Pakistan, tandoor breads are popular especially in the Khyber Pakhtunkhwa and Punjab regions, where naan breads are baked in tandoor clay ovens fired by wood or charcoal. These tandoor-prepared naans are known as tandoori naan.",
"relation": "[Artifact] is a type of [Type]"
}
Reproduce the Dataset
git clone https://huggingface.co/datasets/relbert/t_rex
cd t_rex
mkdir data_raw
cd data_raw
cd data_raw
wget https://figshare.com/ndownloader/files/8760241
unzip 8760241
cd ../
python process.py
python unify_predicate.py
python filtering_purify.py
python create_split.py
Citation Information
@inproceedings{elsahar2018t,
title={T-rex: A large scale alignment of natural language with knowledge base triples},
author={Elsahar, Hady and Vougiouklis, Pavlos and Remaci, Arslen and Gravier, Christophe and Hare, Jonathon and Laforest, Frederique and Simperl, Elena},
booktitle={Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018)},
year={2018}
}