Datasets:

Modalities:
Text
Languages:
English
Libraries:
Datasets
License:
asahi417 commited on
Commit
b8d20b5
·
1 Parent(s): 1a38689

fix readme

Browse files
Files changed (2) hide show
  1. README.md +146 -7
  2. stats.py +21 -5
README.md CHANGED
@@ -7,27 +7,166 @@ multilinguality:
7
  - monolingual
8
  size_categories:
9
  - n<1K
10
- pretty_name: nell
11
  ---
12
 
13
  # Dataset Card for "relbert/nell"
14
  ## Dataset Description
15
  - **Repository:** [https://github.com/xwhan/One-shot-Relational-Learning](https://github.com/xwhan/One-shot-Relational-Learning)
16
  - **Paper:** [https://aclanthology.org/D18-1223/](https://aclanthology.org/D18-1223/)
17
- - **Dataset:** Few-shots link prediction
18
 
19
  ### Dataset Summary
20
  This is NELL-ONE dataset for the few-shots link prediction proposed in [https://aclanthology.org/D18-1223/](https://aclanthology.org/D18-1223/).
21
  Please see [NELL paper](https://www.cs.cmu.edu/~tom/pubs/NELL_aaai15.pdf) to know more about the original dataset.
22
 
23
- | train | validation | test |
24
- |------:|-----------:|-----:|
25
- |8,526 | 1,004 | 2,158 |
26
- |5,498 | 878 | 1,352 |
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  ## Dataset Structure
30
- ### Data Instances
31
  An example of `test` looks as follows.
32
  ```
33
  {
 
7
  - monolingual
8
  size_categories:
9
  - n<1K
10
+ pretty_name: relbert/nell
11
  ---
12
 
13
  # Dataset Card for "relbert/nell"
14
  ## Dataset Description
15
  - **Repository:** [https://github.com/xwhan/One-shot-Relational-Learning](https://github.com/xwhan/One-shot-Relational-Learning)
16
  - **Paper:** [https://aclanthology.org/D18-1223/](https://aclanthology.org/D18-1223/)
17
+ - **Dataset:** Never Ending Language Learner (NELL) dataset for one-shot link prediction.
18
 
19
  ### Dataset Summary
20
  This is NELL-ONE dataset for the few-shots link prediction proposed in [https://aclanthology.org/D18-1223/](https://aclanthology.org/D18-1223/).
21
  Please see [NELL paper](https://www.cs.cmu.edu/~tom/pubs/NELL_aaai15.pdf) to know more about the original dataset.
22
 
23
+ - Number of instances
 
 
 
24
 
25
+ | | train | validation | test |
26
+ |:----------------|--------:|-------------:|-------:|
27
+ | number of pairs | 5498 | 878 | 1352 |
28
+
29
+ - Number of pairs in each relation type
30
+
31
+ | | number of pairs (train) | number of pairs (validation) | number of pairs (test) |
32
+ |:---------------------------------------------------|--------------------------:|-------------------------------:|-------------------------:|
33
+ | concept:airportincity | 210 | 0 | 0 |
34
+ | concept:athleteledsportsteam | 424 | 0 | 0 |
35
+ | concept:automobilemakercardealersinstateorprovince | 78 | 0 | 0 |
36
+ | concept:bankboughtbank | 58 | 0 | 0 |
37
+ | concept:ceoof | 271 | 0 | 0 |
38
+ | concept:cityradiostation | 99 | 0 | 0 |
39
+ | concept:citytelevisionstation | 316 | 0 | 0 |
40
+ | concept:countriessuchascountries | 100 | 0 | 0 |
41
+ | concept:countrycapital | 211 | 0 | 0 |
42
+ | concept:countryhascitizen | 182 | 0 | 0 |
43
+ | concept:countryoforganizationheadquarters | 166 | 0 | 0 |
44
+ | concept:countrystates | 169 | 0 | 0 |
45
+ | concept:drugpossiblytreatsphysiologicalcondition | 91 | 0 | 0 |
46
+ | concept:fatherofperson | 108 | 0 | 0 |
47
+ | concept:fooddecreasestheriskofdisease | 1 | 0 | 0 |
48
+ | concept:hasofficeincountry | 283 | 0 | 0 |
49
+ | concept:leaguecoaches | 71 | 0 | 0 |
50
+ | concept:leaguestadiums | 279 | 0 | 0 |
51
+ | concept:musicartistmusician | 118 | 0 | 0 |
52
+ | concept:musicgenressuchasmusicgenres | 107 | 0 | 0 |
53
+ | concept:organizationnamehasacronym | 61 | 0 | 0 |
54
+ | concept:personalsoknownas | 78 | 0 | 0 |
55
+ | concept:personleadsgeopoliticalorganization | 120 | 0 | 0 |
56
+ | concept:personmovedtostateorprovince | 225 | 0 | 0 |
57
+ | concept:politicianrepresentslocation | 258 | 0 | 0 |
58
+ | concept:politicianusholdsoffice | 216 | 0 | 0 |
59
+ | concept:statehascapital | 151 | 0 | 0 |
60
+ | concept:stateorprovinceoforganizationheadquarters | 118 | 0 | 0 |
61
+ | concept:teamhomestadium | 138 | 0 | 0 |
62
+ | concept:teamplaysincity | 338 | 0 | 0 |
63
+ | concept:topmemberoforganization | 354 | 0 | 0 |
64
+ | concept:wifeof | 99 | 0 | 0 |
65
+ | concept:bankbankincountry | 0 | 229 | 0 |
66
+ | concept:cityalsoknownas | 0 | 356 | 0 |
67
+ | concept:parentofperson | 0 | 217 | 0 |
68
+ | concept:politicalgroupofpoliticianus | 0 | 76 | 0 |
69
+ | concept:automobilemakerdealersincity | 0 | 0 | 177 |
70
+ | concept:automobilemakerdealersincountry | 0 | 0 | 96 |
71
+ | concept:geopoliticallocationresidenceofpersion | 0 | 0 | 143 |
72
+ | concept:politicianusendorsespoliticianus | 0 | 0 | 386 |
73
+ | concept:producedby | 0 | 0 | 209 |
74
+ | concept:teamcoach | 0 | 0 | 341 |
75
+
76
+ - Number of entity types
77
+
78
+ | | head (train) | tail (train) | head (validation) | tail (validation) | head (test) | tail (test) |
79
+ |:-------------------------|---------------:|---------------:|--------------------:|--------------------:|--------------:|--------------:|
80
+ | actor | 6 | 2 | 0 | 0 | 0 | 0 |
81
+ | airport | 152 | 0 | 0 | 0 | 0 | 0 |
82
+ | astronaut | 4 | 0 | 0 | 1 | 0 | 1 |
83
+ | athlete | 353 | 21 | 1 | 2 | 0 | 59 |
84
+ | attraction | 4 | 1 | 0 | 0 | 0 | 0 |
85
+ | automobilemaker | 131 | 29 | 0 | 0 | 273 | 54 |
86
+ | bank | 109 | 126 | 144 | 0 | 0 | 0 |
87
+ | biotechcompany | 14 | 80 | 0 | 0 | 0 | 10 |
88
+ | building | 4 | 0 | 0 | 0 | 0 | 0 |
89
+ | celebrity | 6 | 5 | 0 | 0 | 4 | 2 |
90
+ | ceo | 423 | 0 | 0 | 0 | 0 | 0 |
91
+ | city | 342 | 852 | 316 | 316 | 42 | 161 |
92
+ | coach | 29 | 61 | 0 | 3 | 0 | 245 |
93
+ | comedian | 1 | 0 | 0 | 0 | 0 | 0 |
94
+ | company | 76 | 549 | 1 | 0 | 1 | 144 |
95
+ | country | 755 | 455 | 0 | 197 | 27 | 91 |
96
+ | county | 36 | 39 | 11 | 11 | 10 | 4 |
97
+ | creditunion | 1 | 0 | 0 | 0 | 0 | 0 |
98
+ | criminal | 3 | 0 | 1 | 0 | 0 | 1 |
99
+ | director | 2 | 0 | 0 | 0 | 0 | 1 |
100
+ | drug | 91 | 0 | 0 | 0 | 1 | 0 |
101
+ | female | 116 | 8 | 38 | 9 | 3 | 3 |
102
+ | geopoliticallocation | 184 | 112 | 96 | 29 | 24 | 8 |
103
+ | geopoliticalorganization | 28 | 68 | 8 | 21 | 1 | 7 |
104
+ | governmentorganization | 25 | 95 | 74 | 0 | 0 | 0 |
105
+ | island | 15 | 4 | 4 | 6 | 1 | 0 |
106
+ | journalist | 4 | 0 | 0 | 0 | 0 | 1 |
107
+ | male | 132 | 78 | 37 | 52 | 1 | 5 |
108
+ | model | 2 | 0 | 0 | 0 | 0 | 0 |
109
+ | monarch | 4 | 3 | 4 | 1 | 0 | 0 |
110
+ | museum | 1 | 5 | 0 | 0 | 0 | 0 |
111
+ | musicartist | 118 | 5 | 0 | 0 | 0 | 0 |
112
+ | musicgenre | 107 | 107 | 0 | 0 | 0 | 0 |
113
+ | musician | 5 | 124 | 0 | 0 | 0 | 0 |
114
+ | newspaper | 3 | 2 | 0 | 0 | 0 | 0 |
115
+ | organization | 23 | 86 | 1 | 1 | 32 | 2 |
116
+ | person | 350 | 256 | 116 | 131 | 0 | 96 |
117
+ | personafrica | 1 | 3 | 0 | 0 | 0 | 0 |
118
+ | personasia | 1 | 3 | 0 | 0 | 0 | 0 |
119
+ | personaustralia | 38 | 5 | 0 | 0 | 0 | 5 |
120
+ | personcanada | 19 | 14 | 0 | 0 | 0 | 0 |
121
+ | personeurope | 9 | 7 | 14 | 4 | 0 | 1 |
122
+ | personmexico | 57 | 14 | 0 | 0 | 0 | 20 |
123
+ | personnorthamerica | 9 | 6 | 0 | 0 | 0 | 3 |
124
+ | personsouthamerica | 1 | 1 | 0 | 17 | 0 | 0 |
125
+ | personus | 41 | 21 | 2 | 0 | 1 | 6 |
126
+ | planet | 1 | 0 | 0 | 0 | 0 | 1 |
127
+ | politician | 107 | 5 | 0 | 1 | 23 | 58 |
128
+ | politicianus | 408 | 12 | 3 | 71 | 352 | 360 |
129
+ | politicsblog | 2 | 3 | 0 | 0 | 0 | 0 |
130
+ | port | 7 | 0 | 0 | 0 | 0 | 0 |
131
+ | professor | 7 | 2 | 0 | 0 | 1 | 0 |
132
+ | publication | 1 | 21 | 0 | 0 | 0 | 0 |
133
+ | recordlabel | 1 | 13 | 0 | 0 | 0 | 0 |
134
+ | retailstore | 1 | 15 | 0 | 0 | 0 | 0 |
135
+ | school | 54 | 1 | 0 | 0 | 11 | 0 |
136
+ | scientist | 5 | 2 | 0 | 1 | 0 | 0 |
137
+ | sportsleague | 356 | 12 | 0 | 0 | 0 | 0 |
138
+ | sportsteam | 392 | 430 | 0 | 0 | 295 | 0 |
139
+ | stateorprovince | 254 | 602 | 0 | 0 | 38 | 0 |
140
+ | transportation | 36 | 2 | 0 | 0 | 0 | 0 |
141
+ | university | 3 | 15 | 0 | 0 | 0 | 0 |
142
+ | visualizablescene | 20 | 7 | 3 | 3 | 3 | 3 |
143
+ | visualizablething | 1 | 1 | 1 | 1 | 0 | 0 |
144
+ | website | 7 | 31 | 0 | 0 | 0 | 0 |
145
+ | caf_ | 0 | 1 | 0 | 0 | 0 | 0 |
146
+ | continent | 0 | 1 | 0 | 0 | 0 | 0 |
147
+ | disease | 0 | 92 | 0 | 0 | 0 | 0 |
148
+ | hotel | 0 | 1 | 0 | 0 | 0 | 0 |
149
+ | magazine | 0 | 5 | 0 | 0 | 0 | 0 |
150
+ | nongovorganization | 0 | 4 | 0 | 0 | 0 | 0 |
151
+ | nonprofitorganization | 0 | 2 | 0 | 0 | 0 | 0 |
152
+ | park | 0 | 1 | 0 | 0 | 0 | 0 |
153
+ | petroleumrefiningcompany | 0 | 6 | 0 | 0 | 0 | 0 |
154
+ | politicaloffice | 0 | 216 | 0 | 0 | 0 | 0 |
155
+ | politicalparty | 0 | 6 | 2 | 0 | 0 | 0 |
156
+ | radiostation | 0 | 93 | 0 | 0 | 0 | 0 |
157
+ | river | 0 | 4 | 0 | 0 | 0 | 0 |
158
+ | stadiumoreventvenue | 0 | 417 | 0 | 0 | 0 | 0 |
159
+ | televisionnetwork | 0 | 1 | 0 | 0 | 0 | 0 |
160
+ | televisionstation | 0 | 221 | 0 | 0 | 0 | 0 |
161
+ | trainstation | 0 | 2 | 0 | 0 | 0 | 0 |
162
+ | writer | 0 | 3 | 1 | 0 | 0 | 0 |
163
+ | zoo | 0 | 1 | 0 | 0 | 0 | 0 |
164
+ | automobilemodel | 0 | 0 | 0 | 0 | 100 | 0 |
165
+ | product | 0 | 0 | 0 | 0 | 62 | 0 |
166
+ | software | 0 | 0 | 0 | 0 | 42 | 0 |
167
+ | videogame | 0 | 0 | 0 | 0 | 4 | 0 |
168
 
169
  ## Dataset Structure
 
170
  An example of `test` looks as follows.
171
  ```
172
  {
stats.py CHANGED
@@ -3,11 +3,27 @@ from itertools import chain
3
  import pandas as pd
4
  from datasets import load_dataset
5
 
6
- def get_stats(split):
7
- data = load_dataset("relbert/nell", split=split)
8
- df = data.to_pandas()
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
- s = 'test'
12
-
 
 
13
 
 
3
  import pandas as pd
4
  from datasets import load_dataset
5
 
 
 
 
6
 
7
+ def get_stats():
8
+ relation = []
9
+ entity = []
10
+ size = {}
11
+ data = load_dataset("relbert/nell")
12
+ splits = data.keys()
13
+ for split in splits:
14
+ df = data[split].to_pandas()
15
+ size[split] = len(df)
16
+ relation.append(df.groupby('relation')['head'].count().to_dict())
17
+ entity += [df.groupby('head_type')['head'].count().to_dict(), df.groupby('tail_type')['tail'].count().to_dict()]
18
+ relation = pd.DataFrame(relation, index=[f"number of pairs ({s})" for s in splits]).T
19
+ relation = relation.fillna(0).astype(int)
20
+ entity = pd.DataFrame(entity, index=list(chain(*[[f"head ({s})", f"tail ({s})"] for s in splits]))).T
21
+ entity = entity.fillna(0).astype(int)
22
+ size = pd.DataFrame([size], index=["number of pairs"])
23
+ return relation, entity, size
24
 
25
+ df_relation, df_entity, df_size = get_stats()
26
+ print(f"\n- Number of instances\n\n {df_size.to_markdown()}")
27
+ print(f"\n- Number of pairs in each relation type\n\n {df_relation.to_markdown()}")
28
+ print(f"\n- Number of entity types\n\n {df_entity.to_markdown()}")
29