Commit
·
db0faff
1
Parent(s):
4ded84c
Make list of filenames deterministic (#1)
Browse files- Sort filename list (22471256e112be320103445df20674447ddd7818)
Co-authored-by: Albert Villanova <[email protected]>
euadr.py
CHANGED
@@ -142,7 +142,7 @@ class EUADR(datasets.GeneratorBasedBuilder):
|
|
142 |
folder_path = os.path.join(datapath, "euadr_corpus")
|
143 |
key = 0
|
144 |
if self.config.schema == "source":
|
145 |
-
for filename in os.listdir(folder_path):
|
146 |
if "_" not in filename:
|
147 |
corpus_path = dl_manager.download_and_extract(
|
148 |
f"https://pubmed.ncbi.nlm.nih.gov/{filename[:-4]}/?format=pubmed"
|
@@ -178,7 +178,7 @@ class EUADR(datasets.GeneratorBasedBuilder):
|
|
178 |
}
|
179 |
key += 1
|
180 |
elif self.config.schema == "bigbio_kb":
|
181 |
-
for filename in os.listdir(folder_path):
|
182 |
if "_" not in filename:
|
183 |
corpus_path = dl_manager.download_and_extract(
|
184 |
f"https://pubmed.ncbi.nlm.nih.gov/{filename[:-4]}/?format=pubmed"
|
|
|
142 |
folder_path = os.path.join(datapath, "euadr_corpus")
|
143 |
key = 0
|
144 |
if self.config.schema == "source":
|
145 |
+
for filename in sorted(os.listdir(folder_path)):
|
146 |
if "_" not in filename:
|
147 |
corpus_path = dl_manager.download_and_extract(
|
148 |
f"https://pubmed.ncbi.nlm.nih.gov/{filename[:-4]}/?format=pubmed"
|
|
|
178 |
}
|
179 |
key += 1
|
180 |
elif self.config.schema == "bigbio_kb":
|
181 |
+
for filename in sorted(os.listdir(folder_path)):
|
182 |
if "_" not in filename:
|
183 |
corpus_path = dl_manager.download_and_extract(
|
184 |
f"https://pubmed.ncbi.nlm.nih.gov/{filename[:-4]}/?format=pubmed"
|