Datasets:

Modalities:
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:
system HF staff commited on
Commit
ae8fb9b
1 Parent(s): be9e317

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

Files changed (1) hide show
  1. squad_v2.py +5 -4
squad_v2.py CHANGED
@@ -3,7 +3,6 @@
3
  from __future__ import absolute_import, division, print_function
4
 
5
  import json
6
- import os
7
 
8
  import datasets
9
 
@@ -30,8 +29,10 @@ combines the 100,000 questions in SQuAD1.1 with over 50,000 unanswerable questio
30
  """
31
 
32
  _URL = "https://rajpurkar.github.io/SQuAD-explorer/dataset/"
33
- _DEV_FILE = "dev-v2.0.json"
34
- _TRAINING_FILE = "train-v2.0.json"
 
 
35
 
36
 
37
  class SquadV2Config(datasets.BuilderConfig):
@@ -89,7 +90,7 @@ class SquadV2(datasets.GeneratorBasedBuilder):
89
  # TODO(squad_v2): Downloads the data and defines the splits
90
  # dl_manager is a datasets.download.DownloadManager that can be used to
91
  # download and extract URLs
92
- urls_to_download = {"train": os.path.join(_URL, _TRAINING_FILE), "dev": os.path.join(_URL, _DEV_FILE)}
93
  downloaded_files = dl_manager.download_and_extract(urls_to_download)
94
 
95
  return [
 
3
  from __future__ import absolute_import, division, print_function
4
 
5
  import json
 
6
 
7
  import datasets
8
 
 
29
  """
30
 
31
  _URL = "https://rajpurkar.github.io/SQuAD-explorer/dataset/"
32
+ _URLS = {
33
+ "train": _URL + "train-v2.0.json",
34
+ "dev": _URL + "dev-v2.0.json",
35
+ }
36
 
37
 
38
  class SquadV2Config(datasets.BuilderConfig):
 
90
  # TODO(squad_v2): Downloads the data and defines the splits
91
  # dl_manager is a datasets.download.DownloadManager that can be used to
92
  # download and extract URLs
93
+ urls_to_download = _URLS
94
  downloaded_files = dl_manager.download_and_extract(urls_to_download)
95
 
96
  return [