system HF staff commited on
Commit
73d95b0
1 Parent(s): d29ea9a

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. arcd.py +7 -9
arcd.py CHANGED
@@ -4,7 +4,6 @@ from __future__ import absolute_import, division, print_function
4
 
5
  import json
6
  import logging
7
- import os
8
 
9
  import datasets
10
 
@@ -30,6 +29,12 @@ _DESCRIPTION = """\
30
  posed by crowdworkers on Wikipedia articles.
31
  """
32
 
 
 
 
 
 
 
33
 
34
  class ArcdConfig(datasets.BuilderConfig):
35
  """BuilderConfig for ARCD."""
@@ -46,10 +51,6 @@ class ArcdConfig(datasets.BuilderConfig):
46
  class Arcd(datasets.GeneratorBasedBuilder):
47
  """ARCD: Arabic Reading Comprehension Dataset."""
48
 
49
- _URL = "https://raw.githubusercontent.com/husseinmozannar/SOQAL/master/data/"
50
- _DEV_FILE = "arcd-test.json"
51
- _TRAINING_FILE = "arcd-train.json"
52
-
53
  BUILDER_CONFIGS = [
54
  ArcdConfig(
55
  name="plain_text",
@@ -80,10 +81,7 @@ class Arcd(datasets.GeneratorBasedBuilder):
80
  )
81
 
82
  def _split_generators(self, dl_manager):
83
- urls_to_download = {
84
- "train": os.path.join(self._URL, self._TRAINING_FILE),
85
- "dev": os.path.join(self._URL, self._DEV_FILE),
86
- }
87
  downloaded_files = dl_manager.download_and_extract(urls_to_download)
88
 
89
  return [
 
4
 
5
  import json
6
  import logging
 
7
 
8
  import datasets
9
 
 
29
  posed by crowdworkers on Wikipedia articles.
30
  """
31
 
32
+ _URL = "https://raw.githubusercontent.com/husseinmozannar/SOQAL/master/data/"
33
+ _URLs = {
34
+ "train": _URL + "arcd-train.json",
35
+ "dev": _URL + "arcd-test.json",
36
+ }
37
+
38
 
39
  class ArcdConfig(datasets.BuilderConfig):
40
  """BuilderConfig for ARCD."""
 
51
  class Arcd(datasets.GeneratorBasedBuilder):
52
  """ARCD: Arabic Reading Comprehension Dataset."""
53
 
 
 
 
 
54
  BUILDER_CONFIGS = [
55
  ArcdConfig(
56
  name="plain_text",
 
81
  )
82
 
83
  def _split_generators(self, dl_manager):
84
+ urls_to_download = _URLs
 
 
 
85
  downloaded_files = dl_manager.download_and_extract(urls_to_download)
86
 
87
  return [