--- language: - en license: - other multilinguality: - monolingual pretty_name: t_rex --- # Dataset Card for "relbert/t_rex" ## Dataset Description - **Repository:** [https://hadyelsahar.github.io/t-rex/](https://hadyelsahar.github.io/t-rex/) - **Paper:** [https://aclanthology.org/L18-1544/](https://aclanthology.org/L18-1544/) - **Dataset:** T-REX ## Dataset Summary This is the T-REX dataset proposed in [https://aclanthology.org/L18-1544/](https://aclanthology.org/L18-1544/). We split the raw T-REX dataset into train/validation/test split by the ratio of 70/15/15. | data | train | validation | test | total | |:-----------------------------------------------|--------:|-------------:|-------:|--------:| | filter_unified.min_entity_4_max_predicate_100 | 7,790 | 865 | 2,113 | 10,768 | | filter_unified.min_entity_4_max_predicate_50 | 4,852 | 539 | 1,326 | 6,717 | | filter_unified.min_entity_4_max_predicate_25 | 2,874 | 319 | 768 | 3,961 | | filter_unified.min_entity_4_max_predicate_10 | 1,286 | 142 | 353 | 1,781 | | filter_unified.min_entity_8_max_predicate_100 | 6,117 | 679 | 1,647 | 8,443 | | filter_unified.min_entity_8_max_predicate_50 | 3,823 | 424 | 1,039 | 5,286 | | filter_unified.min_entity_8_max_predicate_25 | 2,319 | 257 | 640 | 3,216 | | filter_unified.min_entity_8_max_predicate_10 | 1,098 | 122 | 302 | 1,522 | | filter_unified.min_entity_12_max_predicate_100 | 5,186 | 576 | 1,429 | 7,191 | | filter_unified.min_entity_12_max_predicate_50 | 3,250 | 361 | 894 | 4,505 | | filter_unified.min_entity_12_max_predicate_25 | 1,971 | 218 | 531 | 2,720 | | filter_unified.min_entity_12_max_predicate_10 | 937 | 104 | 260 | 1,301 | | filter_unified.min_entity_16_max_predicate_100 | 4,690 | 521 | 1,270 | 6,481 | | filter_unified.min_entity_16_max_predicate_50 | 2,894 | 321 | 779 | 3,994 | | filter_unified.min_entity_16_max_predicate_25 | 1,734 | 192 | 463 | 2,389 | | filter_unified.min_entity_16_max_predicate_10 | 809 | 89 | 222 | 1,120 | ### Filtering to Remove Noise We apply filtering to keep triples with alpha-numeric subject and object, as well as triples with at least either of subject or object is a named-entity. After the filtering, we manually remove too vague and noisy predicate, and unify same predicates with different names (see the annotation [here](https://huggingface.co/datasets/relbert/t_rex/raw/main/predicate_manual_check.csv)). | Dataset | Raw | Filter | Unification | |----------:|----------:|----------:|--------------:| | Triples | 941,663 | 583,333 | 432,795 | | Predicate | 931 | 659 | 247 | | Entity | 270,801 | 197,163 | 149,172 | ### 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. - number of triples in each configuration | min entity / max predicate | 10 | 25 | 50 | 100 | |-----------------------------:|-----:|-----:|-----:|------:| | 4 | 1781 | 3961 | 6717 | 10768 | | 8 | 1522 | 3216 | 5286 | 8443 | | 12 | 1301 | 2720 | 4505 | 7191 | | 16 | 1120 | 2389 | 3994 | 6481 | - number of predicates in different min entity size | min entity | 10 | |-------------:|-----:| | 4 | 193 | | 8 | 168 | | 12 | 146 | | 16 | 123 | - distribution of entities - distribution of predicates ## Dataset Structure ### Data Instances An example looks as follows. ``` { "object": "Persian", "subject": "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.", "predicate": "[Artifact] is a type of [Type]" } ``` ### 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} } ```