ashishu007 commited on
Commit
015f28f
1 Parent(s): 499250a

added loader

Browse files
Files changed (2) hide show
  1. sportsett_basketball.py +26 -308
  2. sportsett_basketball_new.py +584 -0
sportsett_basketball.py CHANGED
@@ -83,8 +83,7 @@ class SportSettBasketball(datasets.GeneratorBasedBuilder):
83
  "city": datasets.Value("string"),
84
  "state": datasets.Value("string"),
85
  "attendance": datasets.Value("string"),
86
- "capacity": datasets.Value("string"),
87
- "game_id": datasets.Value("string")
88
  },
89
  "teams": {
90
  "home": {
@@ -94,7 +93,9 @@ class SportSettBasketball(datasets.GeneratorBasedBuilder):
94
  "division": datasets.Value("string"),
95
  "wins": datasets.Value("string"),
96
  "losses": datasets.Value("string"),
97
- "conference_standing": datasets.Value("int32"),
 
 
98
  "game_number": datasets.Value("string"),
99
  "previous_game_id": datasets.Value("string"),
100
  "next_game_id": datasets.Value("string"),
@@ -102,167 +103,29 @@ class SportSettBasketball(datasets.GeneratorBasedBuilder):
102
  "game": {
103
  "FG3A": datasets.Value("string"),
104
  "FG3M": datasets.Value("string"),
105
- "FG3_PCT": datasets.Value("string"),
106
  "FGA": datasets.Value("string"),
107
  "FGM": datasets.Value("string"),
108
- "FG_PCT": datasets.Value("string"),
109
  "FTA": datasets.Value("string"),
110
  "FTM": datasets.Value("string"),
111
- "FT_PCT": datasets.Value("string"),
112
- "DREB": datasets.Value("string"),
113
- "OREB": datasets.Value("string"),
114
- "TREB": datasets.Value("string"),
115
- "BLK": datasets.Value("string"),
116
- "AST": datasets.Value("string"),
117
- "STL": datasets.Value("string"),
118
- "TOV": datasets.Value("string"),
119
  "PF": datasets.Value("string"),
120
- "PTS": datasets.Value("string"),
121
- "MIN": datasets.Value("string")
122
- },
123
- "H1": {
124
- "FG3A": datasets.Value("string"),
125
- "FG3M": datasets.Value("string"),
126
- "FG3_PCT": datasets.Value("string"),
127
- "FGA": datasets.Value("string"),
128
- "FGM": datasets.Value("string"),
129
- "FG_PCT": datasets.Value("string"),
130
- "FTA": datasets.Value("string"),
131
- "FTM": datasets.Value("string"),
132
- "FT_PCT": datasets.Value("string"),
133
  "DREB": datasets.Value("string"),
134
  "OREB": datasets.Value("string"),
135
- "TREB": datasets.Value("string"),
136
  "BLK": datasets.Value("string"),
137
  "AST": datasets.Value("string"),
138
  "STL": datasets.Value("string"),
139
  "TOV": datasets.Value("string"),
140
  "PTS": datasets.Value("string"),
141
- "MIN": datasets.Value("string")
142
  },
143
- "H2": {
144
- "FG3A": datasets.Value("string"),
145
- "FG3M": datasets.Value("string"),
146
- "FG3_PCT": datasets.Value("string"),
147
- "FGA": datasets.Value("string"),
148
- "FGM": datasets.Value("string"),
149
- "FG_PCT": datasets.Value("string"),
150
- "FTA": datasets.Value("string"),
151
- "FTM": datasets.Value("string"),
152
- "FT_PCT": datasets.Value("string"),
153
- "DREB": datasets.Value("string"),
154
- "OREB": datasets.Value("string"),
155
- "TREB": datasets.Value("string"),
156
- "BLK": datasets.Value("string"),
157
- "AST": datasets.Value("string"),
158
- "STL": datasets.Value("string"),
159
- "TOV": datasets.Value("string"),
160
- "PTS": datasets.Value("string"),
161
- "MIN": datasets.Value("string")
162
- },
163
- "Q1": {
164
- "FG3A": datasets.Value("string"),
165
- "FG3M": datasets.Value("string"),
166
- "FG3_PCT": datasets.Value("string"),
167
- "FGA": datasets.Value("string"),
168
- "FGM": datasets.Value("string"),
169
- "FG_PCT": datasets.Value("string"),
170
- "FTA": datasets.Value("string"),
171
- "FTM": datasets.Value("string"),
172
- "FT_PCT": datasets.Value("string"),
173
- "DREB": datasets.Value("string"),
174
- "OREB": datasets.Value("string"),
175
- "TREB": datasets.Value("string"),
176
- "BLK": datasets.Value("string"),
177
- "AST": datasets.Value("string"),
178
- "STL": datasets.Value("string"),
179
- "TOV": datasets.Value("string"),
180
- "PTS": datasets.Value("string"),
181
- "MIN": datasets.Value("string")
182
- },
183
- "Q2": {
184
- "FG3A": datasets.Value("string"),
185
- "FG3M": datasets.Value("string"),
186
- "FG3_PCT": datasets.Value("string"),
187
- "FGA": datasets.Value("string"),
188
- "FGM": datasets.Value("string"),
189
- "FG_PCT": datasets.Value("string"),
190
- "FTA": datasets.Value("string"),
191
- "FTM": datasets.Value("string"),
192
- "FT_PCT": datasets.Value("string"),
193
- "DREB": datasets.Value("string"),
194
- "OREB": datasets.Value("string"),
195
- "TREB": datasets.Value("string"),
196
- "BLK": datasets.Value("string"),
197
- "AST": datasets.Value("string"),
198
- "STL": datasets.Value("string"),
199
- "TOV": datasets.Value("string"),
200
- "PTS": datasets.Value("string"),
201
- "MIN": datasets.Value("string")
202
- },
203
- "Q3": {
204
- "FG3A": datasets.Value("string"),
205
- "FG3M": datasets.Value("string"),
206
- "FG3_PCT": datasets.Value("string"),
207
- "FGA": datasets.Value("string"),
208
- "FGM": datasets.Value("string"),
209
- "FG_PCT": datasets.Value("string"),
210
- "FTA": datasets.Value("string"),
211
- "FTM": datasets.Value("string"),
212
- "FT_PCT": datasets.Value("string"),
213
- "DREB": datasets.Value("string"),
214
- "OREB": datasets.Value("string"),
215
- "TREB": datasets.Value("string"),
216
- "BLK": datasets.Value("string"),
217
- "AST": datasets.Value("string"),
218
- "STL": datasets.Value("string"),
219
- "TOV": datasets.Value("string"),
220
- "PTS": datasets.Value("string"),
221
- "MIN": datasets.Value("string")
222
- },
223
- "Q4": {
224
- "FG3A": datasets.Value("string"),
225
- "FG3M": datasets.Value("string"),
226
- "FG3_PCT": datasets.Value("string"),
227
- "FGA": datasets.Value("string"),
228
- "FGM": datasets.Value("string"),
229
- "FG_PCT": datasets.Value("string"),
230
- "FTA": datasets.Value("string"),
231
- "FTM": datasets.Value("string"),
232
- "FT_PCT": datasets.Value("string"),
233
- "DREB": datasets.Value("string"),
234
- "OREB": datasets.Value("string"),
235
- "TREB": datasets.Value("string"),
236
- "BLK": datasets.Value("string"),
237
- "AST": datasets.Value("string"),
238
- "STL": datasets.Value("string"),
239
- "TOV": datasets.Value("string"),
240
- "PTS": datasets.Value("string"),
241
- "MIN": datasets.Value("string")
242
- },
243
- "OT": {
244
- "FG3A": datasets.Value("string"),
245
- "FG3M": datasets.Value("string"),
246
- "FG3_PCT": datasets.Value("string"),
247
- "FGA": datasets.Value("string"),
248
- "FGM": datasets.Value("string"),
249
- "FG_PCT": datasets.Value("string"),
250
- "FTA": datasets.Value("string"),
251
- "FTM": datasets.Value("string"),
252
- "FT_PCT": datasets.Value("string"),
253
- "DREB": datasets.Value("string"),
254
- "OREB": datasets.Value("string"),
255
- "TREB": datasets.Value("string"),
256
- "BLK": datasets.Value("string"),
257
- "AST": datasets.Value("string"),
258
- "STL": datasets.Value("string"),
259
- "TOV": datasets.Value("string"),
260
- "PTS": datasets.Value("string"),
261
- "MIN": datasets.Value("string")
262
- }
263
  },
264
- "box_score": [
265
- {
266
  "first_name": datasets.Value("string"),
267
  "last_name": datasets.Value("string"),
268
  "name": datasets.Value("string"),
@@ -270,16 +133,12 @@ class SportSettBasketball(datasets.GeneratorBasedBuilder):
270
  "MIN": datasets.Value("string"),
271
  "FGM": datasets.Value("string"),
272
  "FGA": datasets.Value("string"),
273
- "FG_PCT": datasets.Value("string"),
274
  "FG3M": datasets.Value("string"),
275
  "FG3A": datasets.Value("string"),
276
- "FG3_PCT": datasets.Value("string"),
277
  "FTM": datasets.Value("string"),
278
  "FTA": datasets.Value("string"),
279
- "FT_PCT": datasets.Value("string"),
280
  "OREB": datasets.Value("string"),
281
  "DREB": datasets.Value("string"),
282
- "TREB": datasets.Value("string"),
283
  "AST": datasets.Value("string"),
284
  "STL": datasets.Value("string"),
285
  "BLK": datasets.Value("string"),
@@ -287,7 +146,6 @@ class SportSettBasketball(datasets.GeneratorBasedBuilder):
287
  "PF": datasets.Value("string"),
288
  "PTS": datasets.Value("string"),
289
  "+/-": datasets.Value("string"),
290
- "DOUBLE": datasets.Value("string")
291
  }
292
  ],
293
  "next_game": {
@@ -309,7 +167,9 @@ class SportSettBasketball(datasets.GeneratorBasedBuilder):
309
  "division": datasets.Value("string"),
310
  "wins": datasets.Value("string"),
311
  "losses": datasets.Value("string"),
312
- "conference_standing": datasets.Value("int32"),
 
 
313
  "game_number": datasets.Value("string"),
314
  "previous_game_id": datasets.Value("string"),
315
  "next_game_id": datasets.Value("string"),
@@ -317,166 +177,29 @@ class SportSettBasketball(datasets.GeneratorBasedBuilder):
317
  "game": {
318
  "FG3A": datasets.Value("string"),
319
  "FG3M": datasets.Value("string"),
320
- "FG3_PCT": datasets.Value("string"),
321
  "FGA": datasets.Value("string"),
322
  "FGM": datasets.Value("string"),
323
- "FG_PCT": datasets.Value("string"),
324
  "FTA": datasets.Value("string"),
325
  "FTM": datasets.Value("string"),
326
- "FT_PCT": datasets.Value("string"),
327
- "DREB": datasets.Value("string"),
328
- "OREB": datasets.Value("string"),
329
- "TREB": datasets.Value("string"),
330
- "BLK": datasets.Value("string"),
331
- "AST": datasets.Value("string"),
332
- "STL": datasets.Value("string"),
333
- "TOV": datasets.Value("string"),
334
  "PF": datasets.Value("string"),
335
- "PTS": datasets.Value("string"),
336
- "MIN": datasets.Value("string")
337
- },
338
- "H1": {
339
- "FG3A": datasets.Value("string"),
340
- "FG3M": datasets.Value("string"),
341
- "FG3_PCT": datasets.Value("string"),
342
- "FGA": datasets.Value("string"),
343
- "FGM": datasets.Value("string"),
344
- "FG_PCT": datasets.Value("string"),
345
- "FTA": datasets.Value("string"),
346
- "FTM": datasets.Value("string"),
347
- "FT_PCT": datasets.Value("string"),
348
  "DREB": datasets.Value("string"),
349
  "OREB": datasets.Value("string"),
350
- "TREB": datasets.Value("string"),
351
  "BLK": datasets.Value("string"),
352
  "AST": datasets.Value("string"),
353
  "STL": datasets.Value("string"),
354
  "TOV": datasets.Value("string"),
355
  "PTS": datasets.Value("string"),
356
- "MIN": datasets.Value("string")
357
  },
358
- "H2": {
359
- "FG3A": datasets.Value("string"),
360
- "FG3M": datasets.Value("string"),
361
- "FG3_PCT": datasets.Value("string"),
362
- "FGA": datasets.Value("string"),
363
- "FGM": datasets.Value("string"),
364
- "FG_PCT": datasets.Value("string"),
365
- "FTA": datasets.Value("string"),
366
- "FTM": datasets.Value("string"),
367
- "FT_PCT": datasets.Value("string"),
368
- "DREB": datasets.Value("string"),
369
- "OREB": datasets.Value("string"),
370
- "TREB": datasets.Value("string"),
371
- "BLK": datasets.Value("string"),
372
- "AST": datasets.Value("string"),
373
- "STL": datasets.Value("string"),
374
- "TOV": datasets.Value("string"),
375
- "PTS": datasets.Value("string"),
376
- "MIN": datasets.Value("string")
377
- },
378
- "Q1": {
379
- "FG3A": datasets.Value("string"),
380
- "FG3M": datasets.Value("string"),
381
- "FG3_PCT": datasets.Value("string"),
382
- "FGA": datasets.Value("string"),
383
- "FGM": datasets.Value("string"),
384
- "FG_PCT": datasets.Value("string"),
385
- "FTA": datasets.Value("string"),
386
- "FTM": datasets.Value("string"),
387
- "FT_PCT": datasets.Value("string"),
388
- "DREB": datasets.Value("string"),
389
- "OREB": datasets.Value("string"),
390
- "TREB": datasets.Value("string"),
391
- "BLK": datasets.Value("string"),
392
- "AST": datasets.Value("string"),
393
- "STL": datasets.Value("string"),
394
- "TOV": datasets.Value("string"),
395
- "PTS": datasets.Value("string"),
396
- "MIN": datasets.Value("string")
397
- },
398
- "Q2": {
399
- "FG3A": datasets.Value("string"),
400
- "FG3M": datasets.Value("string"),
401
- "FG3_PCT": datasets.Value("string"),
402
- "FGA": datasets.Value("string"),
403
- "FGM": datasets.Value("string"),
404
- "FG_PCT": datasets.Value("string"),
405
- "FTA": datasets.Value("string"),
406
- "FTM": datasets.Value("string"),
407
- "FT_PCT": datasets.Value("string"),
408
- "DREB": datasets.Value("string"),
409
- "OREB": datasets.Value("string"),
410
- "TREB": datasets.Value("string"),
411
- "BLK": datasets.Value("string"),
412
- "AST": datasets.Value("string"),
413
- "STL": datasets.Value("string"),
414
- "TOV": datasets.Value("string"),
415
- "PTS": datasets.Value("string"),
416
- "MIN": datasets.Value("string")
417
- },
418
- "Q3": {
419
- "FG3A": datasets.Value("string"),
420
- "FG3M": datasets.Value("string"),
421
- "FG3_PCT": datasets.Value("string"),
422
- "FGA": datasets.Value("string"),
423
- "FGM": datasets.Value("string"),
424
- "FG_PCT": datasets.Value("string"),
425
- "FTA": datasets.Value("string"),
426
- "FTM": datasets.Value("string"),
427
- "FT_PCT": datasets.Value("string"),
428
- "DREB": datasets.Value("string"),
429
- "OREB": datasets.Value("string"),
430
- "TREB": datasets.Value("string"),
431
- "BLK": datasets.Value("string"),
432
- "AST": datasets.Value("string"),
433
- "STL": datasets.Value("string"),
434
- "TOV": datasets.Value("string"),
435
- "PTS": datasets.Value("string"),
436
- "MIN": datasets.Value("string")
437
- },
438
- "Q4": {
439
- "FG3A": datasets.Value("string"),
440
- "FG3M": datasets.Value("string"),
441
- "FG3_PCT": datasets.Value("string"),
442
- "FGA": datasets.Value("string"),
443
- "FGM": datasets.Value("string"),
444
- "FG_PCT": datasets.Value("string"),
445
- "FTA": datasets.Value("string"),
446
- "FTM": datasets.Value("string"),
447
- "FT_PCT": datasets.Value("string"),
448
- "DREB": datasets.Value("string"),
449
- "OREB": datasets.Value("string"),
450
- "TREB": datasets.Value("string"),
451
- "BLK": datasets.Value("string"),
452
- "AST": datasets.Value("string"),
453
- "STL": datasets.Value("string"),
454
- "TOV": datasets.Value("string"),
455
- "PTS": datasets.Value("string"),
456
- "MIN": datasets.Value("string")
457
- },
458
- "OT": {
459
- "FG3A": datasets.Value("string"),
460
- "FG3M": datasets.Value("string"),
461
- "FG3_PCT": datasets.Value("string"),
462
- "FGA": datasets.Value("string"),
463
- "FGM": datasets.Value("string"),
464
- "FG_PCT": datasets.Value("string"),
465
- "FTA": datasets.Value("string"),
466
- "FTM": datasets.Value("string"),
467
- "FT_PCT": datasets.Value("string"),
468
- "DREB": datasets.Value("string"),
469
- "OREB": datasets.Value("string"),
470
- "TREB": datasets.Value("string"),
471
- "BLK": datasets.Value("string"),
472
- "AST": datasets.Value("string"),
473
- "STL": datasets.Value("string"),
474
- "TOV": datasets.Value("string"),
475
- "PTS": datasets.Value("string"),
476
- "MIN": datasets.Value("string")
477
- }
478
  },
479
- "box_score": [
480
  {
481
  "first_name": datasets.Value("string"),
482
  "last_name": datasets.Value("string"),
@@ -485,16 +208,12 @@ class SportSettBasketball(datasets.GeneratorBasedBuilder):
485
  "MIN": datasets.Value("string"),
486
  "FGM": datasets.Value("string"),
487
  "FGA": datasets.Value("string"),
488
- "FG_PCT": datasets.Value("string"),
489
  "FG3M": datasets.Value("string"),
490
  "FG3A": datasets.Value("string"),
491
- "FG3_PCT": datasets.Value("string"),
492
  "FTM": datasets.Value("string"),
493
  "FTA": datasets.Value("string"),
494
- "FT_PCT": datasets.Value("string"),
495
  "OREB": datasets.Value("string"),
496
  "DREB": datasets.Value("string"),
497
- "TREB": datasets.Value("string"),
498
  "AST": datasets.Value("string"),
499
  "STL": datasets.Value("string"),
500
  "BLK": datasets.Value("string"),
@@ -502,9 +221,8 @@ class SportSettBasketball(datasets.GeneratorBasedBuilder):
502
  "PF": datasets.Value("string"),
503
  "PTS": datasets.Value("string"),
504
  "+/-": datasets.Value("string"),
505
- "DOUBLE": datasets.Value("string")
506
  }
507
- ],
508
  "next_game": {
509
  "day": datasets.Value("string"),
510
  "month": datasets.Value("string"),
 
83
  "city": datasets.Value("string"),
84
  "state": datasets.Value("string"),
85
  "attendance": datasets.Value("string"),
86
+ "capacity": datasets.Value("string")
 
87
  },
88
  "teams": {
89
  "home": {
 
93
  "division": datasets.Value("string"),
94
  "wins": datasets.Value("string"),
95
  "losses": datasets.Value("string"),
96
+ "conference_standing": datasets.Value("string"),
97
+ "division_standing": datasets.Value("string"),
98
+ "streak_num": datasets.Value("string"),
99
  "game_number": datasets.Value("string"),
100
  "previous_game_id": datasets.Value("string"),
101
  "next_game_id": datasets.Value("string"),
 
103
  "game": {
104
  "FG3A": datasets.Value("string"),
105
  "FG3M": datasets.Value("string"),
 
106
  "FGA": datasets.Value("string"),
107
  "FGM": datasets.Value("string"),
 
108
  "FTA": datasets.Value("string"),
109
  "FTM": datasets.Value("string"),
 
 
 
 
 
 
 
 
110
  "PF": datasets.Value("string"),
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  "DREB": datasets.Value("string"),
112
  "OREB": datasets.Value("string"),
 
113
  "BLK": datasets.Value("string"),
114
  "AST": datasets.Value("string"),
115
  "STL": datasets.Value("string"),
116
  "TOV": datasets.Value("string"),
117
  "PTS": datasets.Value("string"),
118
+ "SEC": datasets.Value("string")
119
  },
120
+ "H1": {},
121
+ "H2": {},
122
+ "Q1": {},
123
+ "Q2": {},
124
+ "Q3": {},
125
+ "Q4": {},
126
+ "OT": {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  },
128
+ "box_score": [ {
 
129
  "first_name": datasets.Value("string"),
130
  "last_name": datasets.Value("string"),
131
  "name": datasets.Value("string"),
 
133
  "MIN": datasets.Value("string"),
134
  "FGM": datasets.Value("string"),
135
  "FGA": datasets.Value("string"),
 
136
  "FG3M": datasets.Value("string"),
137
  "FG3A": datasets.Value("string"),
 
138
  "FTM": datasets.Value("string"),
139
  "FTA": datasets.Value("string"),
 
140
  "OREB": datasets.Value("string"),
141
  "DREB": datasets.Value("string"),
 
142
  "AST": datasets.Value("string"),
143
  "STL": datasets.Value("string"),
144
  "BLK": datasets.Value("string"),
 
146
  "PF": datasets.Value("string"),
147
  "PTS": datasets.Value("string"),
148
  "+/-": datasets.Value("string"),
 
149
  }
150
  ],
151
  "next_game": {
 
167
  "division": datasets.Value("string"),
168
  "wins": datasets.Value("string"),
169
  "losses": datasets.Value("string"),
170
+ "conference_standing": datasets.Value("string"),
171
+ "division_standing": datasets.Value("string"),
172
+ "streak_num": datasets.Value("string"),
173
  "game_number": datasets.Value("string"),
174
  "previous_game_id": datasets.Value("string"),
175
  "next_game_id": datasets.Value("string"),
 
177
  "game": {
178
  "FG3A": datasets.Value("string"),
179
  "FG3M": datasets.Value("string"),
 
180
  "FGA": datasets.Value("string"),
181
  "FGM": datasets.Value("string"),
 
182
  "FTA": datasets.Value("string"),
183
  "FTM": datasets.Value("string"),
 
 
 
 
 
 
 
 
184
  "PF": datasets.Value("string"),
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  "DREB": datasets.Value("string"),
186
  "OREB": datasets.Value("string"),
 
187
  "BLK": datasets.Value("string"),
188
  "AST": datasets.Value("string"),
189
  "STL": datasets.Value("string"),
190
  "TOV": datasets.Value("string"),
191
  "PTS": datasets.Value("string"),
192
+ "SEC": datasets.Value("string")
193
  },
194
+ "H1": {},
195
+ "H2": {},
196
+ "Q1": {},
197
+ "Q2": {},
198
+ "Q3": {},
199
+ "Q4": {},
200
+ "OT": {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  },
202
+ "box_score": [
203
  {
204
  "first_name": datasets.Value("string"),
205
  "last_name": datasets.Value("string"),
 
208
  "MIN": datasets.Value("string"),
209
  "FGM": datasets.Value("string"),
210
  "FGA": datasets.Value("string"),
 
211
  "FG3M": datasets.Value("string"),
212
  "FG3A": datasets.Value("string"),
 
213
  "FTM": datasets.Value("string"),
214
  "FTA": datasets.Value("string"),
 
215
  "OREB": datasets.Value("string"),
216
  "DREB": datasets.Value("string"),
 
217
  "AST": datasets.Value("string"),
218
  "STL": datasets.Value("string"),
219
  "BLK": datasets.Value("string"),
 
221
  "PF": datasets.Value("string"),
222
  "PTS": datasets.Value("string"),
223
  "+/-": datasets.Value("string"),
 
224
  }
225
+ ],
226
  "next_game": {
227
  "day": datasets.Value("string"),
228
  "month": datasets.Value("string"),
sportsett_basketball_new.py ADDED
@@ -0,0 +1,584 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """TODO: Add a description here."""
16
+
17
+
18
+ import csv
19
+ import json
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ # TODO: Add BibTeX citation
26
+ # Find for instance the citation on arxiv or on the dataset repo/website
27
+ _CITATION = """\
28
+ @inproceedings{thomson-etal-2020-sportsett,
29
+ title = "{S}port{S}ett:Basketball - A robust and maintainable data-set for Natural Language Generation",
30
+ author = "Thomson, Craig and
31
+ Reiter, Ehud and
32
+ Sripada, Somayajulu",
33
+ booktitle = "Proceedings of the Workshop on Intelligent Information Processing and Natural Language Generation",
34
+ month = sep,
35
+ year = "2020",
36
+ address = "Santiago de Compostela, Spain",
37
+ publisher = "Association for Computational Lingustics",
38
+ url = "https://aclanthology.org/2020.intellang-1.4",
39
+ pages = "32--40",
40
+ }
41
+ """
42
+
43
+ # TODO: Add description of the dataset here
44
+ # You can copy an official description
45
+ _DESCRIPTION = """\
46
+ SportSett:Basketball dataset for Data-to-Text Generation contains NBA games stats aligned with their human written summaries.
47
+ """
48
+
49
+ # TODO: Add a link to an official homepage for the dataset here
50
+ _HOMEPAGE = "https://github.com/nlgcat/sport_sett_basketball"
51
+
52
+ # TODO: Add the licence for the dataset here if you can find it
53
+ _LICENSE = ""
54
+
55
+ # TODO: Add link to the official dataset URLs here
56
+ # The HuggingFace dataset library don't host the datasets but only point to the original files
57
+ # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
58
+ _URLs = {
59
+ "train": "train.json",
60
+ "validation": "validation.json",
61
+ "test": "test.json"
62
+ }
63
+
64
+
65
+ # TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
66
+ class SportSettBasketball(datasets.GeneratorBasedBuilder):
67
+ """SportSett:Basketball datatset for Data-to-Text Generation."""
68
+
69
+ VERSION = datasets.Version("1.1.0")
70
+
71
+ def _info(self):
72
+ features = datasets.Features(
73
+ {
74
+ "sportsett_id": datasets.Value("string"),
75
+ "gem_id": datasets.Value("string"),
76
+ "game": {
77
+ "day": datasets.Value("string"),
78
+ "month": datasets.Value("string"),
79
+ "year": datasets.Value("string"),
80
+ "dayname": datasets.Value("string"),
81
+ "season": datasets.Value("string"),
82
+ "stadium": datasets.Value("string"),
83
+ "city": datasets.Value("string"),
84
+ "state": datasets.Value("string"),
85
+ "attendance": datasets.Value("string"),
86
+ "capacity": datasets.Value("string"),
87
+ "game_id": datasets.Value("string")
88
+ },
89
+ "teams": {
90
+ "home": {
91
+ "name": datasets.Value("string"),
92
+ "place": datasets.Value("string"),
93
+ "conference": datasets.Value("string"),
94
+ "division": datasets.Value("string"),
95
+ "wins": datasets.Value("string"),
96
+ "losses": datasets.Value("string"),
97
+ "conference_standing": datasets.Value("int32"),
98
+ "game_number": datasets.Value("string"),
99
+ "previous_game_id": datasets.Value("string"),
100
+ "next_game_id": datasets.Value("string"),
101
+ "line_score": {
102
+ "game": {
103
+ "FG3A": datasets.Value("string"),
104
+ "FG3M": datasets.Value("string"),
105
+ "FG3_PCT": datasets.Value("string"),
106
+ "FGA": datasets.Value("string"),
107
+ "FGM": datasets.Value("string"),
108
+ "FG_PCT": datasets.Value("string"),
109
+ "FTA": datasets.Value("string"),
110
+ "FTM": datasets.Value("string"),
111
+ "FT_PCT": datasets.Value("string"),
112
+ "DREB": datasets.Value("string"),
113
+ "OREB": datasets.Value("string"),
114
+ "TREB": datasets.Value("string"),
115
+ "BLK": datasets.Value("string"),
116
+ "AST": datasets.Value("string"),
117
+ "STL": datasets.Value("string"),
118
+ "TOV": datasets.Value("string"),
119
+ "PF": datasets.Value("string"),
120
+ "PTS": datasets.Value("string"),
121
+ "MIN": datasets.Value("string")
122
+ },
123
+ "H1": {
124
+ "FG3A": datasets.Value("string"),
125
+ "FG3M": datasets.Value("string"),
126
+ "FG3_PCT": datasets.Value("string"),
127
+ "FGA": datasets.Value("string"),
128
+ "FGM": datasets.Value("string"),
129
+ "FG_PCT": datasets.Value("string"),
130
+ "FTA": datasets.Value("string"),
131
+ "FTM": datasets.Value("string"),
132
+ "FT_PCT": datasets.Value("string"),
133
+ "DREB": datasets.Value("string"),
134
+ "OREB": datasets.Value("string"),
135
+ "TREB": datasets.Value("string"),
136
+ "BLK": datasets.Value("string"),
137
+ "AST": datasets.Value("string"),
138
+ "STL": datasets.Value("string"),
139
+ "TOV": datasets.Value("string"),
140
+ "PTS": datasets.Value("string"),
141
+ "MIN": datasets.Value("string")
142
+ },
143
+ "H2": {
144
+ "FG3A": datasets.Value("string"),
145
+ "FG3M": datasets.Value("string"),
146
+ "FG3_PCT": datasets.Value("string"),
147
+ "FGA": datasets.Value("string"),
148
+ "FGM": datasets.Value("string"),
149
+ "FG_PCT": datasets.Value("string"),
150
+ "FTA": datasets.Value("string"),
151
+ "FTM": datasets.Value("string"),
152
+ "FT_PCT": datasets.Value("string"),
153
+ "DREB": datasets.Value("string"),
154
+ "OREB": datasets.Value("string"),
155
+ "TREB": datasets.Value("string"),
156
+ "BLK": datasets.Value("string"),
157
+ "AST": datasets.Value("string"),
158
+ "STL": datasets.Value("string"),
159
+ "TOV": datasets.Value("string"),
160
+ "PTS": datasets.Value("string"),
161
+ "MIN": datasets.Value("string")
162
+ },
163
+ "Q1": {
164
+ "FG3A": datasets.Value("string"),
165
+ "FG3M": datasets.Value("string"),
166
+ "FG3_PCT": datasets.Value("string"),
167
+ "FGA": datasets.Value("string"),
168
+ "FGM": datasets.Value("string"),
169
+ "FG_PCT": datasets.Value("string"),
170
+ "FTA": datasets.Value("string"),
171
+ "FTM": datasets.Value("string"),
172
+ "FT_PCT": datasets.Value("string"),
173
+ "DREB": datasets.Value("string"),
174
+ "OREB": datasets.Value("string"),
175
+ "TREB": datasets.Value("string"),
176
+ "BLK": datasets.Value("string"),
177
+ "AST": datasets.Value("string"),
178
+ "STL": datasets.Value("string"),
179
+ "TOV": datasets.Value("string"),
180
+ "PTS": datasets.Value("string"),
181
+ "MIN": datasets.Value("string")
182
+ },
183
+ "Q2": {
184
+ "FG3A": datasets.Value("string"),
185
+ "FG3M": datasets.Value("string"),
186
+ "FG3_PCT": datasets.Value("string"),
187
+ "FGA": datasets.Value("string"),
188
+ "FGM": datasets.Value("string"),
189
+ "FG_PCT": datasets.Value("string"),
190
+ "FTA": datasets.Value("string"),
191
+ "FTM": datasets.Value("string"),
192
+ "FT_PCT": datasets.Value("string"),
193
+ "DREB": datasets.Value("string"),
194
+ "OREB": datasets.Value("string"),
195
+ "TREB": datasets.Value("string"),
196
+ "BLK": datasets.Value("string"),
197
+ "AST": datasets.Value("string"),
198
+ "STL": datasets.Value("string"),
199
+ "TOV": datasets.Value("string"),
200
+ "PTS": datasets.Value("string"),
201
+ "MIN": datasets.Value("string")
202
+ },
203
+ "Q3": {
204
+ "FG3A": datasets.Value("string"),
205
+ "FG3M": datasets.Value("string"),
206
+ "FG3_PCT": datasets.Value("string"),
207
+ "FGA": datasets.Value("string"),
208
+ "FGM": datasets.Value("string"),
209
+ "FG_PCT": datasets.Value("string"),
210
+ "FTA": datasets.Value("string"),
211
+ "FTM": datasets.Value("string"),
212
+ "FT_PCT": datasets.Value("string"),
213
+ "DREB": datasets.Value("string"),
214
+ "OREB": datasets.Value("string"),
215
+ "TREB": datasets.Value("string"),
216
+ "BLK": datasets.Value("string"),
217
+ "AST": datasets.Value("string"),
218
+ "STL": datasets.Value("string"),
219
+ "TOV": datasets.Value("string"),
220
+ "PTS": datasets.Value("string"),
221
+ "MIN": datasets.Value("string")
222
+ },
223
+ "Q4": {
224
+ "FG3A": datasets.Value("string"),
225
+ "FG3M": datasets.Value("string"),
226
+ "FG3_PCT": datasets.Value("string"),
227
+ "FGA": datasets.Value("string"),
228
+ "FGM": datasets.Value("string"),
229
+ "FG_PCT": datasets.Value("string"),
230
+ "FTA": datasets.Value("string"),
231
+ "FTM": datasets.Value("string"),
232
+ "FT_PCT": datasets.Value("string"),
233
+ "DREB": datasets.Value("string"),
234
+ "OREB": datasets.Value("string"),
235
+ "TREB": datasets.Value("string"),
236
+ "BLK": datasets.Value("string"),
237
+ "AST": datasets.Value("string"),
238
+ "STL": datasets.Value("string"),
239
+ "TOV": datasets.Value("string"),
240
+ "PTS": datasets.Value("string"),
241
+ "MIN": datasets.Value("string")
242
+ },
243
+ "OT": {
244
+ "FG3A": datasets.Value("string"),
245
+ "FG3M": datasets.Value("string"),
246
+ "FG3_PCT": datasets.Value("string"),
247
+ "FGA": datasets.Value("string"),
248
+ "FGM": datasets.Value("string"),
249
+ "FG_PCT": datasets.Value("string"),
250
+ "FTA": datasets.Value("string"),
251
+ "FTM": datasets.Value("string"),
252
+ "FT_PCT": datasets.Value("string"),
253
+ "DREB": datasets.Value("string"),
254
+ "OREB": datasets.Value("string"),
255
+ "TREB": datasets.Value("string"),
256
+ "BLK": datasets.Value("string"),
257
+ "AST": datasets.Value("string"),
258
+ "STL": datasets.Value("string"),
259
+ "TOV": datasets.Value("string"),
260
+ "PTS": datasets.Value("string"),
261
+ "MIN": datasets.Value("string")
262
+ }
263
+ },
264
+ "box_score": [
265
+ {
266
+ "first_name": datasets.Value("string"),
267
+ "last_name": datasets.Value("string"),
268
+ "name": datasets.Value("string"),
269
+ "starter": datasets.Value("string"),
270
+ "MIN": datasets.Value("string"),
271
+ "FGM": datasets.Value("string"),
272
+ "FGA": datasets.Value("string"),
273
+ "FG_PCT": datasets.Value("string"),
274
+ "FG3M": datasets.Value("string"),
275
+ "FG3A": datasets.Value("string"),
276
+ "FG3_PCT": datasets.Value("string"),
277
+ "FTM": datasets.Value("string"),
278
+ "FTA": datasets.Value("string"),
279
+ "FT_PCT": datasets.Value("string"),
280
+ "OREB": datasets.Value("string"),
281
+ "DREB": datasets.Value("string"),
282
+ "TREB": datasets.Value("string"),
283
+ "AST": datasets.Value("string"),
284
+ "STL": datasets.Value("string"),
285
+ "BLK": datasets.Value("string"),
286
+ "TOV": datasets.Value("string"),
287
+ "PF": datasets.Value("string"),
288
+ "PTS": datasets.Value("string"),
289
+ "+/-": datasets.Value("string"),
290
+ "DOUBLE": datasets.Value("string")
291
+ }
292
+ ],
293
+ "next_game": {
294
+ "day": datasets.Value("string"),
295
+ "month": datasets.Value("string"),
296
+ "year": datasets.Value("string"),
297
+ "dayname": datasets.Value("string"),
298
+ "stadium": datasets.Value("string"),
299
+ "city": datasets.Value("string"),
300
+ "opponent_name": datasets.Value("string"),
301
+ "opponent_place": datasets.Value("string"),
302
+ "is_home": datasets.Value("string"),
303
+ }
304
+ },
305
+ "vis": {
306
+ "name": datasets.Value("string"),
307
+ "place": datasets.Value("string"),
308
+ "conference": datasets.Value("string"),
309
+ "division": datasets.Value("string"),
310
+ "wins": datasets.Value("string"),
311
+ "losses": datasets.Value("string"),
312
+ "conference_standing": datasets.Value("int32"),
313
+ "game_number": datasets.Value("string"),
314
+ "previous_game_id": datasets.Value("string"),
315
+ "next_game_id": datasets.Value("string"),
316
+ "line_score": {
317
+ "game": {
318
+ "FG3A": datasets.Value("string"),
319
+ "FG3M": datasets.Value("string"),
320
+ "FG3_PCT": datasets.Value("string"),
321
+ "FGA": datasets.Value("string"),
322
+ "FGM": datasets.Value("string"),
323
+ "FG_PCT": datasets.Value("string"),
324
+ "FTA": datasets.Value("string"),
325
+ "FTM": datasets.Value("string"),
326
+ "FT_PCT": datasets.Value("string"),
327
+ "DREB": datasets.Value("string"),
328
+ "OREB": datasets.Value("string"),
329
+ "TREB": datasets.Value("string"),
330
+ "BLK": datasets.Value("string"),
331
+ "AST": datasets.Value("string"),
332
+ "STL": datasets.Value("string"),
333
+ "TOV": datasets.Value("string"),
334
+ "PF": datasets.Value("string"),
335
+ "PTS": datasets.Value("string"),
336
+ "MIN": datasets.Value("string")
337
+ },
338
+ "H1": {
339
+ "FG3A": datasets.Value("string"),
340
+ "FG3M": datasets.Value("string"),
341
+ "FG3_PCT": datasets.Value("string"),
342
+ "FGA": datasets.Value("string"),
343
+ "FGM": datasets.Value("string"),
344
+ "FG_PCT": datasets.Value("string"),
345
+ "FTA": datasets.Value("string"),
346
+ "FTM": datasets.Value("string"),
347
+ "FT_PCT": datasets.Value("string"),
348
+ "DREB": datasets.Value("string"),
349
+ "OREB": datasets.Value("string"),
350
+ "TREB": datasets.Value("string"),
351
+ "BLK": datasets.Value("string"),
352
+ "AST": datasets.Value("string"),
353
+ "STL": datasets.Value("string"),
354
+ "TOV": datasets.Value("string"),
355
+ "PTS": datasets.Value("string"),
356
+ "MIN": datasets.Value("string")
357
+ },
358
+ "H2": {
359
+ "FG3A": datasets.Value("string"),
360
+ "FG3M": datasets.Value("string"),
361
+ "FG3_PCT": datasets.Value("string"),
362
+ "FGA": datasets.Value("string"),
363
+ "FGM": datasets.Value("string"),
364
+ "FG_PCT": datasets.Value("string"),
365
+ "FTA": datasets.Value("string"),
366
+ "FTM": datasets.Value("string"),
367
+ "FT_PCT": datasets.Value("string"),
368
+ "DREB": datasets.Value("string"),
369
+ "OREB": datasets.Value("string"),
370
+ "TREB": datasets.Value("string"),
371
+ "BLK": datasets.Value("string"),
372
+ "AST": datasets.Value("string"),
373
+ "STL": datasets.Value("string"),
374
+ "TOV": datasets.Value("string"),
375
+ "PTS": datasets.Value("string"),
376
+ "MIN": datasets.Value("string")
377
+ },
378
+ "Q1": {
379
+ "FG3A": datasets.Value("string"),
380
+ "FG3M": datasets.Value("string"),
381
+ "FG3_PCT": datasets.Value("string"),
382
+ "FGA": datasets.Value("string"),
383
+ "FGM": datasets.Value("string"),
384
+ "FG_PCT": datasets.Value("string"),
385
+ "FTA": datasets.Value("string"),
386
+ "FTM": datasets.Value("string"),
387
+ "FT_PCT": datasets.Value("string"),
388
+ "DREB": datasets.Value("string"),
389
+ "OREB": datasets.Value("string"),
390
+ "TREB": datasets.Value("string"),
391
+ "BLK": datasets.Value("string"),
392
+ "AST": datasets.Value("string"),
393
+ "STL": datasets.Value("string"),
394
+ "TOV": datasets.Value("string"),
395
+ "PTS": datasets.Value("string"),
396
+ "MIN": datasets.Value("string")
397
+ },
398
+ "Q2": {
399
+ "FG3A": datasets.Value("string"),
400
+ "FG3M": datasets.Value("string"),
401
+ "FG3_PCT": datasets.Value("string"),
402
+ "FGA": datasets.Value("string"),
403
+ "FGM": datasets.Value("string"),
404
+ "FG_PCT": datasets.Value("string"),
405
+ "FTA": datasets.Value("string"),
406
+ "FTM": datasets.Value("string"),
407
+ "FT_PCT": datasets.Value("string"),
408
+ "DREB": datasets.Value("string"),
409
+ "OREB": datasets.Value("string"),
410
+ "TREB": datasets.Value("string"),
411
+ "BLK": datasets.Value("string"),
412
+ "AST": datasets.Value("string"),
413
+ "STL": datasets.Value("string"),
414
+ "TOV": datasets.Value("string"),
415
+ "PTS": datasets.Value("string"),
416
+ "MIN": datasets.Value("string")
417
+ },
418
+ "Q3": {
419
+ "FG3A": datasets.Value("string"),
420
+ "FG3M": datasets.Value("string"),
421
+ "FG3_PCT": datasets.Value("string"),
422
+ "FGA": datasets.Value("string"),
423
+ "FGM": datasets.Value("string"),
424
+ "FG_PCT": datasets.Value("string"),
425
+ "FTA": datasets.Value("string"),
426
+ "FTM": datasets.Value("string"),
427
+ "FT_PCT": datasets.Value("string"),
428
+ "DREB": datasets.Value("string"),
429
+ "OREB": datasets.Value("string"),
430
+ "TREB": datasets.Value("string"),
431
+ "BLK": datasets.Value("string"),
432
+ "AST": datasets.Value("string"),
433
+ "STL": datasets.Value("string"),
434
+ "TOV": datasets.Value("string"),
435
+ "PTS": datasets.Value("string"),
436
+ "MIN": datasets.Value("string")
437
+ },
438
+ "Q4": {
439
+ "FG3A": datasets.Value("string"),
440
+ "FG3M": datasets.Value("string"),
441
+ "FG3_PCT": datasets.Value("string"),
442
+ "FGA": datasets.Value("string"),
443
+ "FGM": datasets.Value("string"),
444
+ "FG_PCT": datasets.Value("string"),
445
+ "FTA": datasets.Value("string"),
446
+ "FTM": datasets.Value("string"),
447
+ "FT_PCT": datasets.Value("string"),
448
+ "DREB": datasets.Value("string"),
449
+ "OREB": datasets.Value("string"),
450
+ "TREB": datasets.Value("string"),
451
+ "BLK": datasets.Value("string"),
452
+ "AST": datasets.Value("string"),
453
+ "STL": datasets.Value("string"),
454
+ "TOV": datasets.Value("string"),
455
+ "PTS": datasets.Value("string"),
456
+ "MIN": datasets.Value("string")
457
+ },
458
+ "OT": {
459
+ "FG3A": datasets.Value("string"),
460
+ "FG3M": datasets.Value("string"),
461
+ "FG3_PCT": datasets.Value("string"),
462
+ "FGA": datasets.Value("string"),
463
+ "FGM": datasets.Value("string"),
464
+ "FG_PCT": datasets.Value("string"),
465
+ "FTA": datasets.Value("string"),
466
+ "FTM": datasets.Value("string"),
467
+ "FT_PCT": datasets.Value("string"),
468
+ "DREB": datasets.Value("string"),
469
+ "OREB": datasets.Value("string"),
470
+ "TREB": datasets.Value("string"),
471
+ "BLK": datasets.Value("string"),
472
+ "AST": datasets.Value("string"),
473
+ "STL": datasets.Value("string"),
474
+ "TOV": datasets.Value("string"),
475
+ "PTS": datasets.Value("string"),
476
+ "MIN": datasets.Value("string")
477
+ }
478
+ },
479
+ "box_score": [
480
+ {
481
+ "first_name": datasets.Value("string"),
482
+ "last_name": datasets.Value("string"),
483
+ "name": datasets.Value("string"),
484
+ "starter": datasets.Value("string"),
485
+ "MIN": datasets.Value("string"),
486
+ "FGM": datasets.Value("string"),
487
+ "FGA": datasets.Value("string"),
488
+ "FG_PCT": datasets.Value("string"),
489
+ "FG3M": datasets.Value("string"),
490
+ "FG3A": datasets.Value("string"),
491
+ "FG3_PCT": datasets.Value("string"),
492
+ "FTM": datasets.Value("string"),
493
+ "FTA": datasets.Value("string"),
494
+ "FT_PCT": datasets.Value("string"),
495
+ "OREB": datasets.Value("string"),
496
+ "DREB": datasets.Value("string"),
497
+ "TREB": datasets.Value("string"),
498
+ "AST": datasets.Value("string"),
499
+ "STL": datasets.Value("string"),
500
+ "BLK": datasets.Value("string"),
501
+ "TOV": datasets.Value("string"),
502
+ "PF": datasets.Value("string"),
503
+ "PTS": datasets.Value("string"),
504
+ "+/-": datasets.Value("string"),
505
+ "DOUBLE": datasets.Value("string")
506
+ }
507
+ ],
508
+ "next_game": {
509
+ "day": datasets.Value("string"),
510
+ "month": datasets.Value("string"),
511
+ "year": datasets.Value("string"),
512
+ "dayname": datasets.Value("string"),
513
+ "stadium": datasets.Value("string"),
514
+ "city": datasets.Value("string"),
515
+ "opponent_name": datasets.Value("string"),
516
+ "opponent_place": datasets.Value("string"),
517
+ "is_home": datasets.Value("string"),
518
+ }
519
+ }
520
+ },
521
+ "summaries": datasets.Sequence(datasets.Value("string")),
522
+ }
523
+ )
524
+ return datasets.DatasetInfo(
525
+ description=_DESCRIPTION,
526
+ features=features,
527
+ supervised_keys=None,
528
+ homepage=_HOMEPAGE,
529
+ license=_LICENSE,
530
+ citation=_CITATION,
531
+ )
532
+
533
+ def _split_generators(self, dl_manager):
534
+ """Returns SplitGenerators."""
535
+ # TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
536
+ # If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
537
+
538
+ # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLs
539
+ # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
540
+ # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
541
+ data_dir = dl_manager.download_and_extract(_URLs)
542
+ return [
543
+ datasets.SplitGenerator(
544
+ name=datasets.Split.TRAIN,
545
+ # These kwargs will be passed to _generate_examples
546
+ gen_kwargs={
547
+ "filepath": data_dir["train"],
548
+ "split": "train",
549
+ },
550
+ ),
551
+ datasets.SplitGenerator(
552
+ name=datasets.Split.TEST,
553
+ # These kwargs will be passed to _generate_examples
554
+ gen_kwargs={
555
+ "filepath": data_dir["test"],
556
+ "split": "test"
557
+ },
558
+ ),
559
+ datasets.SplitGenerator(
560
+ name=datasets.Split.VALIDATION,
561
+ # These kwargs will be passed to _generate_examples
562
+ gen_kwargs={
563
+ "filepath": data_dir["validation"],
564
+ "split": "validation",
565
+ },
566
+ ),
567
+ ]
568
+
569
+ def _generate_examples(
570
+ self, filepath, split # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
571
+ ):
572
+ """ Yields examples as (key, example) tuples. """
573
+ # This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
574
+ # The `key` is here for legacy reason (tfds) and is not important in itself.
575
+
576
+ js = json.load(open(filepath, encoding="utf-8"))
577
+ for id_, data in enumerate(js):
578
+ yield id_, {
579
+ "sportsett_id": data["sportsett_id"],
580
+ "gem_id": data["gem_id"],
581
+ "game": data["game"],
582
+ "teams": data["teams"],
583
+ "summaries": data["summaries"],
584
+ }