ToluClassics commited on
Commit
01add28
·
1 Parent(s): bbcd3c1

modify file to enable different splits per language

Browse files
Files changed (1) hide show
  1. afriqa-gold-passages.py +6 -5
afriqa-gold-passages.py CHANGED
@@ -95,11 +95,12 @@ class AfriQA(datasets.GeneratorBasedBuilder):
95
 
96
  def _split_generators(self, dl_manager):
97
  """Returns SplitGenerators."""
98
- urls_to_download = {
99
- "train": f"{_URL}{self.config.name}/gold_span_passages.afriqa.{self.config.name}.{_LANG_2_PIVOT[self.config.name]}.train.json",
100
- "dev": f"{_URL}{self.config.name}/gold_span_passages.afriqa.{self.config.name}.{_LANG_2_PIVOT[self.config.name]}.dev.json",
101
- "test": f"{_URL}{self.config.name}/gold_span_passages.afriqa.{self.config.name}.{_LANG_2_PIVOT[self.config.name]}.test.json",
102
- }
 
103
  downloaded_files = dl_manager.download_and_extract(urls_to_download)
104
 
105
  splits_list = []
 
95
 
96
  def _split_generators(self, dl_manager):
97
  """Returns SplitGenerators."""
98
+
99
+ urls_to_download = {}
100
+
101
+ for split in _LANG_2_SPLITS[self.config.name]:
102
+ urls_to_download[split] = f"{_URL}{self.config.name}/gold_span_passages.afriqa.{self.config.name}.{_LANG_2_PIVOT[self.config.name]}.{split}.json"
103
+
104
  downloaded_files = dl_manager.download_and_extract(urls_to_download)
105
 
106
  splits_list = []