joelniklaus commited on
Commit
bcafdef
1 Parent(s): 30dd125

made small change to loading script

Browse files
Files changed (1) hide show
  1. EU_Wikipedias.py +4 -1
EU_Wikipedias.py CHANGED
@@ -43,6 +43,8 @@ _LANGUAGES = ["bg", "cs", "da", "de", "el", "en", "es", "et", "fi", "fr", "ga",
43
 
44
  _DATES = ["20221120"] # one can add more in the future with the file prepare_wikipedias.py
45
 
 
 
46
 
47
  class EUWikipediasConfig(datasets.BuilderConfig):
48
  """BuilderConfig for EUWikipedias."""
@@ -105,7 +107,8 @@ class EUWikipedias(datasets.GeneratorBasedBuilder):
105
 
106
  for language in languages:
107
  info = {"language": language}
108
- for shard in range(50): # 50 shards per language at most (English has 10 in 20221120)
 
109
  try:
110
  info["filepath"] = download_url("joelito/EU_Wikipedias", f"{self.config.date}/{language}_{shard}")
111
  data_infos.append(info.copy())
 
43
 
44
  _DATES = ["20221120"] # one can add more in the future with the file prepare_wikipedias.py
45
 
46
+ # IMPORTANT: Increase this once larger datasets are available (English has 11 in 20221120)
47
+ _HIGHEST_NUMBER_OF_SHARDS = 11
48
 
49
  class EUWikipediasConfig(datasets.BuilderConfig):
50
  """BuilderConfig for EUWikipedias."""
 
107
 
108
  for language in languages:
109
  info = {"language": language}
110
+
111
+ for shard in range(_HIGHEST_NUMBER_OF_SHARDS):
112
  try:
113
  info["filepath"] = download_url("joelito/EU_Wikipedias", f"{self.config.date}/{language}_{shard}")
114
  data_infos.append(info.copy())