File size: 4,294 Bytes
7b9e520
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a361ef5
7b9e520
a361ef5
 
 
 
 
 
7fe48b5
 
 
 
 
a361ef5
 
a6894a2
 
 
32d7e91
 
a361ef5
79543d6
 
dce486f
 
 
 
 
 
 
 
 
 
 
 
 
 
79543d6
 
 
b48bc6f
a6894a2
79543d6
 
37599eb
7b9e520
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
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.

### 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.

| Dataset | Raw | Filter |
|--------:|----:|-------:|
| Triples | 941,663 | 662,482 |
| Predicate| 931 | 818 |
| Entity | 270,801 | 197,302 |

### 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 | 4501 | 9245 | 15196 | 23936 |
|                            8 | 3557 | 7291 | 11804 | 18699 |
|                           12 | 3132 | 6346 | 10155 | 16115 |
|                           16 | 2769 | 5559 |  9014 | 14499 |


|   min entity | predicate |
|-------------:|-----:|
|            4 |  516 |
|            8 |  409 |
|           12 |  366 |
|           16 |  321 |

- distribution of entities

<img src="https://huggingface.co/datasets/relbert/t_rex/resolve/main/data/stats.entity_distribution.png" alt="" width="500" style="margin-left:'auto' margin-right:'auto' display:'block'"/>

- distribution of predicates

<img src="https://huggingface.co/datasets/relbert/t_rex/resolve/main/data/stats.predicate_distribution.png" alt="" width="500" style="margin-left:'auto' margin-right:'auto' display:'block'"/>


## Dataset Structure
### Data Instances
An example looks as follows.
```
{
  "predicate": "released",
  "object": "December 18, 1954",
  "subject": "It",
  "title": "Touché, Pussy Cat!",
  "text": "Touché, Pussy Cat! is a 1954 one-reel animated Tom and Jerry short, directed by William Hanna and Joseph Barbera, with production by Fred Quimby and music by Scott Bradley. It was nominated for an Academy Award in 1954, the series' final Oscar nomination, while Johann Mouse won the last award for the series a year before. Touché, Pussy Cat! is a follow-up to the 1952 cartoon The Two Mouseketeers, which won the 1951 Academy Award. The title is also Tuffy's catchphrase in the \"Mouseketeer\" shorts. The cartoon was animated by Kenneth Muse, Ed Barge and Irven Spence, with backgrounds by Robert Gentle. It was released in theaters by Metro-Goldwyn-Mayer on December 18, 1954. It was the first of the Tom and Jerry shorts to be produced in the widescreen CinemaScope format, but was the second CinemaScope-produced short to be released (after Pet Peeve, released the previous month; Touché, Pussy Cat! has an earlier MPAA certificate number). The cartoon also exists in a non-Cinemascope format. Touché, Pussy Cat! spawned two further entries in the \"Mouseketeer\" series of Tom and Jerry cartoons, namely Tom and Chérie in 1955, and Royal Cat Nap in 1958."
}
```

### 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}
} 
```