Datasets:

Modalities:
Text
Languages:
English
Libraries:
Datasets
License:
asahi417 commited on
Commit
3ba8c94
·
1 Parent(s): 1a427bf

fix readme

Browse files
Files changed (3) hide show
  1. README.md +8 -381
  2. fewshot_link_prediction.py → nell.py +19 -16
  3. stats.py +6 -8
README.md CHANGED
@@ -7,10 +7,10 @@ multilinguality:
7
  - monolingual
8
  size_categories:
9
  - n<1K
10
- pretty_name: link_prediction_nell_one
11
  ---
12
 
13
- # Dataset Card for "relbert/link_prediction_nell_one"
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/)
@@ -20,19 +20,15 @@ pretty_name: link_prediction_nell_one
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
- |nell|8,526 | 1,004 | 2,158 |
26
- |nell_filter|5,498 | 878 | 1,352 |
27
 
28
 
29
-
30
- ***TODO***
31
- - map the wikidata id to the name of the enity for the wiki-one dataset
32
-
33
  ## Dataset Structure
34
  ### Data Instances
35
- An example of `test` of `nell` looks as follows.
36
  ```
37
  {
38
  "relation": "concept:sportsgamesport",
@@ -41,377 +37,8 @@ An example of `test` of `nell` looks as follows.
41
  }
42
  ```
43
 
44
- ## Statistics on the NELL test split
45
-
46
- - Vocab
47
-
48
- | entity_type | nell | nell_filter | sample |
49
- |:-------------------------|-------:|--------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
50
- | person | 4026 | 4026 | Greg, Sol Hoffman, Arthur Penn |
51
- | book | 3835 | 3835 | The Lover, Cosmos, Vixen |
52
- | city | 3020 | 3020 | Butte, Loma Linda, Hamilton |
53
- | athlete | 2965 | 2965 | Reggie Bush, Juan Nicasio, Jeff Fiorentino |
54
- | company | 2520 | 2520 | New York Times Business, Wane, Navini Networks |
55
- | sportsteam | 1799 | 1799 | Colts, Uc Irvine Anteaters, Arkansas Tech Wonder Boys |
56
- | clothing | 1589 | 0 | umbrellas, simple dress, matters |
57
- | writer | 1345 | 1345 | Jenna Blum, Kelley Armstrong, Vs Naipaul |
58
- | academicfield | 1154 | 0 | international development, wildlife management, lubbock |
59
- | drug | 1030 | 1030 | Dulcolax, Lyrica, Metronidazol |
60
- | televisionstation | 1018 | 1018 | Wupw Tv, Msnbc, Daily Herald |
61
- | geopoliticallocation | 1016 | 1016 | Spicewood, Massillon, Northwestern Mexico |
62
- | personus | 996 | 996 | James Brolin, Stephen Gyllenhaal, Kelly Preston |
63
- | weapon | 932 | 0 | sized gas, wmd, mirv |
64
- | coach | 924 | 924 | Gary Pinkel, Clinton White, Mike Gundy |
65
- | journalist | 875 | 875 | Alan Cooperman, Elizabeth Kolbert, Rusty Anderson |
66
- | room | 848 | 0 | galleried bedroom, style kitchen, bigger room |
67
- | musicartist | 814 | 814 | Tomorrow, Threats, Circle Jerks |
68
- | politicianus | 713 | 713 | Democrats Barack Obama, Military Personnel, Frederick Douglass |
69
- | stadiumoreventvenue | 648 | 648 | Rebook Stadium, Balcones Heights, Boone Pickens Stadium |
70
- | officebuildingroom | 636 | 0 | oversized guest rooms, 2 cabins, quadruple rooms |
71
- | chemical | 620 | 0 | global warming pollution, lactose, floor |
72
- | movie | 620 | 620 | Goldeneye, The Ten Commandments, Southland Tales |
73
- | musician | 619 | 619 | Jeff Tweedy, Chuck Berry, Wayne Coyne |
74
- | ceo | 619 | 619 | Hector Ruiz, Use All Rights, Michael J Critelli |
75
- | university | 616 | 616 | Victoria College, Raytheon, Longwood |
76
- | geopoliticalorganization | 612 | 612 | Devonshire, Clewiston, Kumasi |
77
- | stateorprovince | 600 | 600 | Karnataka, Styria, St George |
78
- | profession | 592 | 0 | mediators, agents, gastroenterologists |
79
- | plant | 568 | 0 | china grass, tree ferns, deutzia |
80
- | aquarium | 535 | 0 | 5 gallon saltwater aquarium, aquascape all glass aquarium, bor s djurpark |
81
- | website | 533 | 533 | New Republic Magazine, Canadian, Lycos |
82
- | county | 522 | 522 | Janesville, Denton City, Pocahontas |
83
- | disease | 510 | 510 | Sunburn, Mental Health Issues, Behavioural Problems |
84
- | male | 484 | 484 | Offense, Pilsen, Brisbane |
85
- | radiostation | 476 | 476 | Job, Klrt, Geneva |
86
- | country | 472 | 472 | Denmark, South West Asia, Latvia |
87
- | jobposition | 458 | 0 | construction manager, governments, senior minister |
88
- | agriculturalproduct | 449 | 0 | acai berry, root vegetables, vehicles |
89
- | biotechcompany | 435 | 435 | Ortho Mcneil, Cameco, Chubb Corp |
90
- | bakedgood | 430 | 0 | shakes, 2 cookies, biscuits |
91
- | bank | 430 | 430 | Ual, Ing Direct, State Bank |
92
- | hotel | 428 | 428 | Shangri La, Novotel, Algonquin Hotel |
93
- | organization | 424 | 424 | Appletv, Sports Service, Year The Red Sox |
94
- | actor | 418 | 418 | Financial, Posts, Marilyn Monroe |
95
- | governmentorganization | 409 | 409 | High Government, US Federal Office, Immunization Branch Texas Department |
96
- | personeurope | 402 | 402 | Arthur Miller, Line, Steven Greenhouse |
97
- | food | 393 | 0 | feta, red fruits, chunkier foods |
98
- | female | 390 | 390 | Paris Hilton, Balius, Terri Seymour |
99
- | visualizablething | 386 | 386 | Kennebunk, Cruise, Marlton |
100
- | personcanada | 365 | 365 | Matthew Perry, Sheryl Crow, Billy Gilman |
101
- | newspaper | 357 | 357 | Evening Times, Art New England, Morning Herald |
102
- | visualizablescene | 357 | 357 | Vallejo, River Edge, Wagrain |
103
- | river | 344 | 344 | Wisconsin River, Rivanna, Mississippi River |
104
- | politician | 342 | 342 | Andrew Miller, Senator Ted Kennedy, Julie Mason |
105
- | attraction | 339 | 339 | The London Eye, Shakespeare Globe, St James Palace |
106
- | politicsblog | 335 | 335 | Austin American, BBC News, Oc Register |
107
- | animal | 312 | 0 | pets, parrots, waterbirds |
108
- | celebrity | 307 | 307 | Eliza Dushku, Yellowcard, Marion Cotillard |
109
- | blog | 306 | 0 | maya angelou, news com, news network |
110
- | building | 304 | 304 | Dream, Place, Warhol Museum |
111
- | mammal | 304 | 0 | designer dog, commonplace animals, north america |
112
- | director | 299 | 299 | Vincent Minnelli, Stephen Gaghan, Fred Zinnemann |
113
- | bodypart | 299 | 0 | chambers, atrial septum, dog s heart |
114
- | scientificterm | 294 | 294 | Learning Invariances In Neural Nets, Cross Product, Sequential Minimal Optimization |
115
- | personmexico | 274 | 274 | Bob Welch, David Garrard, Woody Johnson |
116
- | island | 270 | 270 | Tango, Grand Island, Bay Of Plenty |
117
- | personaustralia | 263 | 263 | Charles De Lint, Ford Madox Ford, Malcolm Lowry |
118
- | transportation | 258 | 258 | Maglev, Lirr, Text |
119
- | hobby | 258 | 0 | day trips, recreational opportunities, discussions |
120
- | musicalbum | 257 | 257 | Two Days, Halo, Oceania |
121
- | park | 247 | 247 | Shepherds Bush, Brockton, Sites |
122
- | criminal | 243 | 243 | Blog Entries, Articles The 3, Lary Hoover |
123
- | visualartist | 239 | 239 | Juan Gris, Rafael, Mattia Preti |
124
- | airport | 236 | 236 | Cyprus, Charlotte Douglas International, North Las Vegas Airport |
125
- | professor | 235 | 235 | Ian Flemming, Christopher Hitchens, One David |
126
- | bathroomitem | 235 | 0 | showerhead, hot tub, large soaking tub |
127
- | personnorthamerica | 235 | 235 | Ken Belson, Michael Albert, Florida Marlins |
128
- | emotion | 230 | 230 | Lack, Lethargy, Type |
129
- | school | 229 | 229 | Wayne State University, Wilberforce University, North Carolina State University |
130
- | sportsgame | 226 | 226 | 1932 World Series, Days Last Year, 1905 World Series |
131
- | buildingfeature | 216 | 216 | Users, Points, Front Doors |
132
- | insect | 214 | 0 | parasitic wasps, young grubs, ladybugs |
133
- | automobilemodel | 210 | 210 | Toyota Tacoma, 300zx, Custom 500 |
134
- | furniture | 210 | 0 | berths, ashley furniture, bedding |
135
- | publication | 205 | 205 | Dow Jones, News Corp, Mci |
136
- | scientist | 204 | 204 | Epsilon, Jorge Luis Borges, Balmer |
137
- | magazine | 203 | 203 | Harpers, Real People, Afghan Civilians |
138
- | bird | 199 | 0 | granivorous, jacanas, large bird |
139
- | product | 194 | 194 | Toshiba, Linux, Ms Windows |
140
- | professionalorganization | 192 | 0 | interface, asi, healthcare reform |
141
- | musicsong | 186 | 186 | Boys, God Of Thunder, Last Time |
142
- | personafrica | 185 | 185 | Guillermo Del Toro, Cameron Crowe, Warner Baxter |
143
- | automobilemaker | 177 | 177 | German Automakers, Yamaha, Gma |
144
- | televisionshow | 176 | 176 | Concentration, Rambling Rose, Tribune |
145
- | lake | 172 | 172 | Lake Bartlett, Crystal Lake, Lake Tahoe |
146
- | museum | 168 | 168 | Home, Path, Forbes Galleries |
147
- | artery | 167 | 167 | Arms, Hepatic Artery, Left Side |
148
- | bacteria | 165 | 165 | P Falciparum, Parasite Trypanosoma Cruzi, Actinomyces Israelii |
149
- | beverage | 164 | 0 | high efficiency water, breakfast, duet |
150
- | language | 162 | 162 | Alemannic, Albanian, Castilian |
151
- | comedian | 159 | 159 | Kate Douglas Wiggin, Jenny Mollen, Jean Jacques Annaud |
152
- | politicsissue | 152 | 0 | nursing degree, resource services, journalism degree |
153
- | mountain | 150 | 150 | Sierra Nevada, Geography, Southern Appalachian |
154
- | landscapefeatures | 148 | 0 | deserts, sanctuary, managment |
155
- | fish | 146 | 0 | starfish, sea bream, sea anemones |
156
- | sportsequipment | 138 | 138 | Golf Shoes, Top, Bat |
157
- | retailstore | 138 | 138 | Express Post, L L Bean Outdoor Discovery Schools, Stater Bros |
158
- | musicinstrument | 135 | 135 | Acoustic Bass, Firo B, Drum |
159
- | skiarea | 132 | 132 | Lake Erie, Fraser River, Oak Forest |
160
- | programminglanguage | 131 | 131 | Credits, The New, Tips |
161
- | software | 130 | 130 | System Works, Windows Server 2, Perfect Fit |
162
- | winery | 126 | 126 | Windsor, Melville, Sanford |
163
- | geometricshape | 125 | 125 | Theory, Degree, Regions |
164
- | sport | 123 | 0 | area agencies, golf, professional football |
165
- | location | 122 | 0 | convenient place, saipan, cosmopolitan areas |
166
- | recordlabel | 121 | 121 | Cheap Trick, Columbia Records, Young Money Entertainment |
167
- | physiologicalcondition | 121 | 0 | stomach ulcers, stress, medical illness |
168
- | vertebrate | 120 | 0 | cattles, mountain lions, nature horses |
169
- | physicalaction | 115 | 115 | Pakistan, Markets, Beaverton |
170
- | personasia | 115 | 115 | Subpages, Family Members, Chat |
171
- | musicgenre | 107 | 107 | Synth Pop, Dancehall, New Wave |
172
- | vehicle | 103 | 0 | escape hybrid, countries, emergency vehicles |
173
- | sportsteamposition | 102 | 102 | Offensive Lineman, Defender, Change |
174
- | date | 101 | 0 | 1968, 1927, the end of the year |
175
- | eventoutcome | 100 | 100 | Incredible Experience, Huge Impact, Corruption |
176
- | vegetable | 99 | 0 | onion, radish, steamed vegetables |
177
- | sportsleague | 98 | 98 | National Hockey League, Minors, Archives |
178
- | arthropod | 96 | 0 | small invertebrates, woodlice, arthropods |
179
- | politicalparty | 95 | 95 | Country Party, Gaming, House Water |
180
- | politicaloffice | 95 | 95 | Secretary Of State, Senate President, Business Centers |
181
- | awardtrophytournament | 95 | 95 | Super Bowl Title, Alan I Rothenberg Trophy, Medals |
182
- | hallwayitem | 93 | 0 | panel, vent, free |
183
- | model | 92 | 92 | Sarah Ban Breathnach, Jonathan Hunt, Ingrid |
184
- | shoppingmall | 91 | 91 | Colonial Park, Caesars Palace, Manhattan Mall Shopping Center |
185
- | terroristorganization | 87 | 87 | Palestinian Militants, Times, Incident |
186
- | hospital | 86 | 86 | Plymouth Village, Prudential Center, Trinity Mother Frances |
187
- | economicsector | 86 | 0 | search, loans insurance, insurance companies |
188
- | braintissue | 86 | 86 | Temporal Lobe, 2, Brain Areas |
189
- | color | 84 | 84 | Blend, Blue Pearl, Inspection |
190
- | weatherphenomenon | 83 | 83 | Entire, Whirlwind, Thing |
191
- | bedroomitem | 82 | 0 | order, full bath, marketplace |
192
- | reptile | 81 | 0 | leopard, arrow, tree |
193
- | chef | 80 | 80 | Jerome Jesus, Philippa Gregory, James Owen Smith |
194
- | currency | 79 | 79 | Pesetas, Acres, Kwacha |
195
- | invertebrate | 79 | 0 | mangora genus spider, wood storks, mammals |
196
- | amphibian | 78 | 0 | crowned eagle, behavior, ferruginous hawk |
197
- | monument | 77 | 77 | National Cathedral, Slidell, Los Alamos |
198
- | charactertrait | 77 | 77 | Initiative, Prevention, World |
199
- | street | 76 | 76 | Abercorn Street, Temple Street, College Street |
200
- | visualizableobject | 72 | 72 | Jersey, Desktop Computer, Kickstand |
201
- | restaurant | 69 | 69 | Fix, Peking Duck House Restaurant, Rite Aid Corporation |
202
- | nongovorganization | 69 | 69 | U S, Sri Lankan Government, Lehi |
203
- | wine | 69 | 0 | grains, johannisberg riesling, joint venture |
204
- | buildingmaterial | 68 | 68 | Fiberglass, Stainless Steel, Filigree |
205
- | videogame | 66 | 66 | Nights, Legend Of Zelda, Guitar Hero |
206
- | nerve | 65 | 65 | Musculoskeletal System, Elbow, Human Brain |
207
- | dateliteral | 65 | 0 | 1947, 1931, april 24 2013 |
208
- | architect | 65 | 0 | albert, renzo piano, hart wood |
209
- | monarch | 59 | 59 | Julian The Apostate, Single Mother, All Star |
210
- | religion | 57 | 57 | Tabernacle, A Di Da Buddhist Temple, Thousand Years |
211
- | videogamesystem | 56 | 56 | System Upgrades, Play Station, Os |
212
- | condiment | 56 | 0 | red cabbage, bbq sauce, glaze |
213
- | trainstation | 54 | 54 | Baltimore And Potomac Railroad Station, Allack Station, Ideal Base |
214
- | mldataset | 54 | 54 | 38, 7, Senior |
215
- | year | 53 | 53 | 1887, 1881, 1903 |
216
- | personsouthamerica | 52 | 52 | Pepita Jimenez, Juan Valera, Michael Grant |
217
- | kitchenitem | 52 | 0 | large refrigerator, staple, double oven |
218
- | beach | 52 | 52 | Brandeis, Supply, W Palm Beach |
219
- | astronaut | 51 | 51 | Discovery, Vance Brand, Charles Stross |
220
- | crimeorcharge | 50 | 0 | credit, probation, violent crimes |
221
- | parlourgame | 50 | 50 | The Man With The Twisted Lip, Six Hour Drive, Water |
222
- | ethnicgroup | 50 | 50 | Soviet, Darling, Same Way |
223
- | muscle | 50 | 50 | Hamstring, Transverse, Abdominal Muscles |
224
- | farm | 49 | 49 | The United States, Puddicombe Farms, Orchard Valley Farms |
225
- | nonprofitorganization | 49 | 49 | Haven, Humane Society, Drools |
226
- | zoo | 49 | 49 | Denver Zoo, Saint Louis Zoo, Port Clinton |
227
- | agent | 47 | 0 | anderson, derek powazek, liberty media corp |
228
- | consumerelectronicitem | 47 | 47 | Ds Lite, Gba Sp, Ratings |
229
- | tool | 47 | 47 | Checklists, Tools, Laundry Machine |
230
- | port | 46 | 46 | Tampa International Airport, Kalmar, Ronald Reagan National Airport |
231
- | mlauthor | 46 | 46 | Web Search, Alexander Doni, Yoram Singer |
232
- | meat | 46 | 0 | aunt, flank steak, cream sauce |
233
- | mollusk | 46 | 0 | rays, sea shells, find |
234
- | crustacean | 45 | 0 | large image, lvmh, open directory project |
235
- | musicfestival | 45 | 45 | Yamaha Music Festival, Wygant State Natural Area, William M Tugman State Park |
236
- | tableitem | 43 | 0 | amr, registry, favor |
237
- | planet | 42 | 42 | Result, Potpourri, Matter |
238
- | conference | 41 | 41 | Bs, Uae, Strc |
239
- | tradeunion | 40 | 0 | gmp, operators, legend |
240
- | skyscraper | 40 | 40 | Compromise, Cn Tower, International City |
241
- | protein | 40 | 40 | Insulin, Collagen, Laboratory |
242
- | arachnid | 40 | 0 | movies, meetings, tick |
243
- | nondiseasecondition | 39 | 39 | Job, System, Production |
244
- | visualartform | 36 | 36 | Famous Painting, Perfume, Sculpture |
245
- | grain | 35 | 0 | popcorn, jasmine rice, pole beans |
246
- | visualartmovement | 34 | 34 | Surrealism, Dada, Britain |
247
- | fruit | 34 | 0 | oranges, peaches, black berries |
248
- | wallitem | 33 | 33 | Writing, Times, Transfer |
249
- | candy | 33 | 0 | heart, candy corn, bounty |
250
- | bone | 32 | 0 | two, human bone marrow, one arm |
251
- | election | 30 | 30 | Same Name, Charles De Gaulle, Death |
252
- | mlsoftware | 30 | 0 | vlc, spies, instance |
253
- | highway | 30 | 30 | Four Miles, West Branch, First Place |
254
- | event | 29 | 29 | Obtain, Tsunami Relief, Liquidity Crisis |
255
- | placeofworship | 28 | 28 | Htilominlo Temple, Fort George, Wallington |
256
- | nonneginteger | 28 | 28 | 90, 2, 4 |
257
- | visualizableattribute | 27 | 27 | Dots, Huge, Cloud |
258
- | boardgame | 27 | 27 | Winners, Truck, Risk |
259
- | politicsbill | 26 | 26 | Climate Stewardship Acts, Patriot Act, Courtesy |
260
- | householditem | 26 | 26 | Home Heating, Size Sofabed, Range |
261
- | creditunion | 25 | 25 | Banks, Bad Credit Mortgage Loan, First State |
262
- | perceptionaction | 25 | 25 | Iowa City, Committee Hearing, Ames |
263
- | automobileengine | 24 | 24 | Ford, Publishing, Ford Escort |
264
- | creativework | 24 | 24 | Bad Dreams, Bedtime Stories, Evil Dead |
265
- | mlarea | 22 | 22 | Roles, Conditional Random Fields, Graphical Models |
266
- | nut | 22 | 0 | year s, sesame seeds, living |
267
- | race | 22 | 22 | Queensland, Morbihan, July 2 |
268
- | personalcareitem | 22 | 22 | Tent, Wash, Brush |
269
- | mlalgorithm | 22 | 22 | Design, 2 0, Sons |
270
- | vein | 21 | 21 | Forage, Viscera, Adipose |
271
- | sociopolitical | 21 | 21 | Output, Development, Government |
272
- | researchproject | 21 | 21 | Science, Feasibility Study, Education Research |
273
- | bridge | 20 | 20 | High Bridge, Honor, Millennium Bridge |
274
- | archaea | 20 | 20 | Sulfolobus Acidocaldarius, Halobacteria, A |
275
- | cheese | 19 | 19 | Jack Cheese, Ricotta Cheese, Fontina Cheese |
276
- | legume | 19 | 0 | washing machine, string beans, southwestern |
277
- | mountainrange | 17 | 17 | Appalachian, West Hills, Eagle Creek |
278
- | physicalcharacteristic | 17 | 17 | Humanity, Strictest, Foray |
279
- | cardgame | 16 | 16 | Taking, UK, Free |
280
- | medicalprocedure | 16 | 16 | Cpr, Chamber, Oxygen |
281
- | sportsevent | 16 | 16 | Short Months, Decade, Please Contact |
282
- | militaryconflict | 15 | 15 | Six Day War, Great War, War |
283
- | mlmetric | 15 | 15 | 9 11, Sums, Variation |
284
- | petroleumrefiningcompany | 14 | 14 | Valero, Bp America, Ultramar Diamond Shamrock |
285
- | celltype | 14 | 14 | Liver, Women S Hospital, Capacity |
286
- | traditionalgame | 13 | 13 | Horseshoe Casino, 3 5, Daughters |
287
- | mlconference | 13 | 13 | Interview, Kingman, Services The Ability |
288
- | convention | 12 | 12 | Conversation, Technorati, Condition |
289
- | meetingeventtitle | 12 | 12 | Brain Maps To Mechanisms Neural Circuit Molecular Architecture, Robot Futures, Math Monkeys And The Developing Brain |
290
- | trail | 11 | 11 | In New Jersey, Miller Park, In Philadelphia |
291
- | meetingeventtype | 11 | 11 | Joint Department Of Neurobiology And Center For The Neural Basis Of Cognition And Systems Neuroscience Institue Seminar, Innovators Forum, Scs Author Presentation Booksigning |
292
- | judge | 11 | 11 | Ny, Times Union, Parsons |
293
- | physicsterm | 10 | 10 | Momentum, 19 9 Percent, 15 Miles |
294
- | coffeedrink | 10 | 0 | coffee, mocha, turkish coffee |
295
- | cognitiveactions | 10 | 10 | Goal, Abilities, Learning |
296
- | zipcode | 10 | 10 | 19103, 33130, 77063 |
297
- | mediatype | 10 | 10 | Databases, Irrigation, Medium |
298
- | month | 10 | 0 | december, november, march |
299
- | perceptionevent | 9 | 9 | Beep, Macromedia Flash, Light |
300
- | cave | 8 | 0 | san gabriel, will, ie |
301
- | lymphnode | 8 | 8 | Healthy Eating, Lymph Nodes, Lymph System |
302
- | continent | 7 | 7 | European Continent, South America, Europe |
303
- | filmfestival | 7 | 7 | Beginning, Igoogle, New York Times Company |
304
- | officeitem | 7 | 7 | Capacities, Policy Page, Credit Card Click |
305
- | fungus | 7 | 0 | compound, cook, enrichment |
306
- | url | 6 | 6 | Direct Links, Numerous Links, Links Links |
307
- | olympics | 6 | 6 | CBS Television Network, Palestinian National Authority, Mayor |
308
- | game | 6 | 6 | Aspects, Designee The Vice, Nice 3 |
309
- | flooritem | 5 | 5 | Storage Tank, Waste Management, Water Quality |
310
- | televisionnetwork | 5 | 5 | Cw, PBS, Independent |
311
- | time | 4 | 4 | 8 30 P M, 7 Click, 4 00 P M Contact |
312
- | mediacompany | 4 | 4 | Vibrant Media, Media Public, Simplify Media |
313
- | dayofweek | 4 | 4 | Monday, Wednesday, Tuesday |
314
- | caf_ | 3 | 3 | Starbucks Coffee Company, Sbux, Tim Hortons |
315
- | victim | 3 | 3 | Resources Students, Health Sciences Students, Technology Students |
316
- | militaryeventtype | 3 | 3 | Regimes, Attacks, Clashes |
317
- | item | 3 | 3 | Laundry Detergent, Laptop, Dishes |
318
- | geolocatablething | 3 | 3 | Buildings, Iquique, Cars |
319
- | politicsgroup | 2 | 2 | Description, Moveon Org |
320
- | gamescore | 2 | 2 | 4 5, 2 3 |
321
- | refineryproduct | 2 | 2 | Coolant, East Coast Ports |
322
- | grandprix | 2 | 2 | Renault, Bernie Ecclestone |
323
- | personbylocation | 1 | 1 | Dan Garton |
324
- | species | 1 | 1 | Marine Flora |
325
- | humanagent | 1 | 1 | Monsanto Co S G D Searle Division |
326
- | virus | 1 | 1 | Safe Drinking Water |
327
- | recipe | 1 | 1 | Rice |
328
- | SUM | 68518 | 53887 | |
329
-
330
- - Head/Tail Entity Distribution
331
-
332
- | entity_type | nell (head) | nell_filter (head) | nell (tail) | nell_filter (tail) |
333
- |:-------------------------|--------------:|---------------------:|--------------:|---------------------:|
334
- | politicianus | 352 | 352 | 360 | 360 |
335
- | sportsteam | 295 | 295 | 0 | 0 |
336
- | automobilemaker | 274 | 273 | 54 | 54 |
337
- | insect | 230 | 0 | 270 | 0 |
338
- | automobilemodel | 100 | 100 | 0 | 0 |
339
- | animal | 97 | 0 | 30 | 0 |
340
- | sport | 93 | 0 | 74 | 0 |
341
- | agriculturalproduct | 87 | 0 | 0 | 0 |
342
- | sportsgame | 74 | 0 | 0 | 0 |
343
- | product | 62 | 62 | 0 | 0 |
344
- | software | 42 | 42 | 0 | 0 |
345
- | city | 42 | 42 | 161 | 161 |
346
- | stateorprovince | 38 | 38 | 0 | 0 |
347
- | athlete | 34 | 0 | 59 | 59 |
348
- | organization | 32 | 32 | 2 | 2 |
349
- | arthropod | 32 | 0 | 41 | 0 |
350
- | beverage | 27 | 0 | 0 | 0 |
351
- | country | 27 | 27 | 317 | 91 |
352
- | geopoliticallocation | 24 | 24 | 14 | 8 |
353
- | mammal | 23 | 0 | 0 | 0 |
354
- | politician | 23 | 23 | 58 | 58 |
355
- | person | 14 | 0 | 96 | 96 |
356
- | invertebrate | 14 | 0 | 43 | 0 |
357
- | personmexico | 13 | 0 | 20 | 20 |
358
- | crustacean | 11 | 0 | 25 | 0 |
359
- | coffeedrink | 11 | 0 | 0 | 0 |
360
- | school | 11 | 11 | 0 | 0 |
361
- | hobby | 10 | 0 | 0 | 0 |
362
- | county | 10 | 10 | 4 | 4 |
363
- | vegetable | 8 | 0 | 0 | 0 |
364
- | reptile | 4 | 0 | 0 | 0 |
365
- | personaustralia | 4 | 0 | 5 | 5 |
366
- | videogame | 4 | 4 | 0 | 0 |
367
- | food | 4 | 0 | 0 | 0 |
368
- | celebrity | 4 | 4 | 2 | 2 |
369
- | male | 3 | 1 | 5 | 5 |
370
- | female | 3 | 3 | 3 | 3 |
371
- | visualizablescene | 3 | 3 | 3 | 3 |
372
- | grain | 2 | 0 | 0 | 0 |
373
- | vehicle | 2 | 0 | 0 | 0 |
374
- | amphibian | 2 | 0 | 0 | 0 |
375
- | legume | 1 | 0 | 0 | 0 |
376
- | company | 1 | 1 | 147 | 144 |
377
- | arachnid | 1 | 0 | 6 | 0 |
378
- | coach | 1 | 0 | 245 | 245 |
379
- | mlsoftware | 1 | 0 | 0 | 0 |
380
- | fruit | 1 | 0 | 0 | 0 |
381
- | professor | 1 | 1 | 0 | 0 |
382
- | island | 1 | 1 | 0 | 0 |
383
- | chemical | 1 | 0 | 0 | 0 |
384
- | personus | 1 | 1 | 6 | 6 |
385
- | personnorthamerica | 1 | 0 | 3 | 3 |
386
- | geopoliticalorganization | 1 | 1 | 17 | 7 |
387
- | drug | 1 | 1 | 0 | 0 |
388
- | planet | 0 | 0 | 1 | 1 |
389
- | bodypart | 0 | 0 | 69 | 0 |
390
- | criminal | 0 | 0 | 1 | 1 |
391
- | director | 0 | 0 | 1 | 1 |
392
- | personeurope | 0 | 0 | 1 | 1 |
393
- | astronaut | 0 | 0 | 1 | 1 |
394
- | journalist | 0 | 0 | 1 | 1 |
395
- | location | 0 | 0 | 2 | 0 |
396
- | biotechcompany | 0 | 0 | 11 | 10 |
397
-
398
- - Relation Size
399
-
400
- | relation_type | nell | nell_filter |
401
- |:-----------------------------------------------|-------:|--------------:|
402
- | concept:animalsuchasinvertebrate | 415 | 0 |
403
- | concept:politicianusendorsespoliticianus | 386 | 386 |
404
- | concept:teamcoach | 341 | 341 |
405
- | concept:producedby | 213 | 209 |
406
- | concept:automobilemakerdealersincity | 178 | 177 |
407
- | concept:geopoliticallocationresidenceofpersion | 143 | 143 |
408
- | concept:agriculturalproductcamefromcountry | 140 | 0 |
409
- | concept:sportschoolincountry | 103 | 0 |
410
- | concept:automobilemakerdealersincountry | 96 | 96 |
411
- | concept:sportsgamesport | 74 | 0 |
412
- | concept:athleteinjuredhisbodypart | 69 | 0 |
413
 
414
- ### Citation Information
415
  ```
416
  @inproceedings{xiong-etal-2018-one,
417
  title = "One-Shot Relational Learning for Knowledge Graphs",
 
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/)
 
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
  {
34
  "relation": "concept:sportsgamesport",
 
37
  }
38
  ```
39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
+ ## Citation Information
42
  ```
43
  @inproceedings{xiong-etal-2018-one,
44
  title = "One-Shot Relational Learning for Knowledge Graphs",
fewshot_link_prediction.py → nell.py RENAMED
@@ -4,8 +4,8 @@ import datasets
4
 
5
  logger = datasets.logging.get_logger(__name__)
6
  _DESCRIPTION = """Few shots link prediction dataset. """
7
- _NAME = "fewshot_link_prediction"
8
- _VERSION = "0.0.5"
9
  _CITATION = """
10
  @inproceedings{xiong-etal-2018-one,
11
  title = "One-Shot Relational Learning for Knowledge Graphs",
@@ -29,15 +29,20 @@ _CITATION = """
29
  _HOME_PAGE = "https://github.com/asahi417/relbert"
30
  _URL = f'https://huggingface.co/datasets/relbert/{_NAME}/resolve/main/data'
31
  # _TYPES = ["nell_filter", "nell", "wiki"]
32
- _TYPES = ["nell_filter", "nell"]
33
- _URLS = {i: {
34
- str(datasets.Split.TRAIN): [f'{_URL}/{i}.train.jsonl'],
35
- str(datasets.Split.VALIDATION): [f'{_URL}/{i}.validation.jsonl'],
36
- str(datasets.Split.TEST): [f'{_URL}/{i}.test.jsonl']
37
- } for i in _TYPES}
 
 
 
 
 
38
 
39
 
40
- class FewShotLinkPredictionConfig(datasets.BuilderConfig):
41
  """BuilderConfig"""
42
 
43
  def __init__(self, **kwargs):
@@ -45,19 +50,17 @@ class FewShotLinkPredictionConfig(datasets.BuilderConfig):
45
  Args:
46
  **kwargs: keyword arguments forwarded to super.
47
  """
48
- super(FewShotLinkPredictionConfig, self).__init__(**kwargs)
49
 
50
 
51
- class FewShotLinkPrediction(datasets.GeneratorBasedBuilder):
52
  """Dataset."""
53
 
54
- BUILDER_CONFIGS = [
55
- FewShotLinkPredictionConfig(name=i, version=datasets.Version(_VERSION), description=_DESCRIPTION)
56
- for i in sorted(_TYPES)
57
- ]
58
 
59
  def _split_generators(self, dl_manager):
60
- downloaded_file = dl_manager.download_and_extract(_URLS[self.config.name])
 
61
  return [datasets.SplitGenerator(name=i, gen_kwargs={"filepaths": downloaded_file[str(i)]})
62
  for i in [datasets.Split.TRAIN, datasets.Split.VALIDATION, datasets.Split.TEST]]
63
 
 
4
 
5
  logger = datasets.logging.get_logger(__name__)
6
  _DESCRIPTION = """Few shots link prediction dataset. """
7
+ _NAME = "nell"
8
+ _VERSION = "0.0.6"
9
  _CITATION = """
10
  @inproceedings{xiong-etal-2018-one,
11
  title = "One-Shot Relational Learning for Knowledge Graphs",
 
29
  _HOME_PAGE = "https://github.com/asahi417/relbert"
30
  _URL = f'https://huggingface.co/datasets/relbert/{_NAME}/resolve/main/data'
31
  # _TYPES = ["nell_filter", "nell", "wiki"]
32
+ # _URLS = {i: {
33
+ # str(datasets.Split.TRAIN): [f'{_URL}/{i}.train.jsonl'],
34
+ # str(datasets.Split.VALIDATION): [f'{_URL}/{i}.validation.jsonl'],
35
+ # str(datasets.Split.TEST): [f'{_URL}/{i}.test.jsonl']
36
+ # } for i in _TYPES}
37
+ _TYPE = "nell_filter"
38
+ _URLS = {
39
+ str(datasets.Split.TRAIN): [f'{_URL}/{_TYPE}.train.jsonl'],
40
+ str(datasets.Split.VALIDATION): [f'{_URL}/{_TYPE}.validation.jsonl'],
41
+ str(datasets.Split.TEST): [f'{_URL}/{_TYPE}.test.jsonl']
42
+ }
43
 
44
 
45
+ class NELLConfig(datasets.BuilderConfig):
46
  """BuilderConfig"""
47
 
48
  def __init__(self, **kwargs):
 
50
  Args:
51
  **kwargs: keyword arguments forwarded to super.
52
  """
53
+ super(NELLConfig, self).__init__(**kwargs)
54
 
55
 
56
+ class NELL(datasets.GeneratorBasedBuilder):
57
  """Dataset."""
58
 
59
+ BUILDER_CONFIGS = [NELLConfig(name=_TYPE, version=datasets.Version(_VERSION), description=_DESCRIPTION)]
 
 
 
60
 
61
  def _split_generators(self, dl_manager):
62
+ # downloaded_file = dl_manager.download_and_extract(_URLS[self.config.name])
63
+ downloaded_file = dl_manager.download_and_extract(_URLS)
64
  return [datasets.SplitGenerator(name=i, gen_kwargs={"filepaths": downloaded_file[str(i)]})
65
  for i in [datasets.Split.TRAIN, datasets.Split.VALIDATION, datasets.Split.TEST]]
66
 
stats.py CHANGED
@@ -1,10 +1,9 @@
1
  import pandas as pd
2
- import numpy as np
3
  from datasets import load_dataset
4
  from itertools import chain
5
 
6
  tmp = {}
7
- for _type in ['nell', 'nell_filter']:
8
  with open(f"data/{_type}.vocab.txt") as f:
9
  vocab = pd.DataFrame([i.split("\t") for i in f.read().split('\n') if len(i) > 0], columns=["entity", "type"])
10
  vocab_df = vocab.groupby("type").count().sort_values(by="entity", ascending=False)
@@ -32,8 +31,8 @@ for split in ['train', 'validation', 'test']:
32
  print(split)
33
 
34
  tmp = {}
35
- for _type in ['nell', 'nell_filter']:
36
- data = load_dataset("relbert/fewshot_link_prediction", _type, split=split)
37
  df = data.to_pandas()
38
 
39
  tail = df.groupby("tail_type")['relation'].count().to_dict()
@@ -56,10 +55,9 @@ for split in ['train', 'validation', 'test']:
56
  print(df.to_markdown(index=False))
57
 
58
  tmp = {}
59
- for _type in ['nell', 'nell_filter']:
60
- data = load_dataset("relbert/fewshot_link_prediction", _type, split=split)
61
- df = data.to_pandas()
62
- tmp[_type] = df.groupby("relation").count()['head']
63
  keys = set(list(chain(*[list(v.index) for v in tmp.values()])))
64
  df = pd.DataFrame([{
65
  "relation_type": k,
 
1
  import pandas as pd
 
2
  from datasets import load_dataset
3
  from itertools import chain
4
 
5
  tmp = {}
6
+ for _type in ['nell_filter']:
7
  with open(f"data/{_type}.vocab.txt") as f:
8
  vocab = pd.DataFrame([i.split("\t") for i in f.read().split('\n') if len(i) > 0], columns=["entity", "type"])
9
  vocab_df = vocab.groupby("type").count().sort_values(by="entity", ascending=False)
 
31
  print(split)
32
 
33
  tmp = {}
34
+ for _type in ['nell_filter']:
35
+ data = load_dataset("relbert/nell", _type, split=split)
36
  df = data.to_pandas()
37
 
38
  tail = df.groupby("tail_type")['relation'].count().to_dict()
 
55
  print(df.to_markdown(index=False))
56
 
57
  tmp = {}
58
+ data = load_dataset("relbert/nell", split=split)
59
+ df = data.to_pandas()
60
+ tmp[_type] = df.groupby("relation").count()['head']
 
61
  keys = set(list(chain(*[list(v.index) for v in tmp.values()])))
62
  df = pd.DataFrame([{
63
  "relation_type": k,