Update xtd_11.py
Browse files
xtd_11.py
CHANGED
@@ -49,14 +49,13 @@ class XTD_11(datasets.GeneratorBasedBuilder):
|
|
49 |
"""Returns SplitGenerators."""
|
50 |
# Define your base URL or local path where the files are located
|
51 |
data_urls = [f"{_Base_url}{lang}.json" for lang in self.config.subset]
|
52 |
-
print(data_urls)
|
53 |
|
54 |
# Generate splits for each language
|
55 |
-
return datasets.SplitGenerator(
|
56 |
name=datasets.Split.TEST,
|
57 |
# Assuming the use of URLs. For local files, adjust accordingly.
|
58 |
gen_kwargs={"filepaths": dl_manager.download(data_urls)}
|
59 |
-
)
|
60 |
|
61 |
|
62 |
|
@@ -64,7 +63,6 @@ class XTD_11(datasets.GeneratorBasedBuilder):
|
|
64 |
"""Yields examples."""
|
65 |
# This method needs to handle both single and multiple filepaths
|
66 |
# Adjust the logic based on how you want to load and yield data from your JSON files
|
67 |
-
print("@@@@@@@@@@@@@@@@@@@@@@@@@@@")
|
68 |
id_ = 0
|
69 |
for filepath in filepaths:
|
70 |
# Load data from a single file
|
|
|
49 |
"""Returns SplitGenerators."""
|
50 |
# Define your base URL or local path where the files are located
|
51 |
data_urls = [f"{_Base_url}{lang}.json" for lang in self.config.subset]
|
|
|
52 |
|
53 |
# Generate splits for each language
|
54 |
+
return [datasets.SplitGenerator(
|
55 |
name=datasets.Split.TEST,
|
56 |
# Assuming the use of URLs. For local files, adjust accordingly.
|
57 |
gen_kwargs={"filepaths": dl_manager.download(data_urls)}
|
58 |
+
)]
|
59 |
|
60 |
|
61 |
|
|
|
63 |
"""Yields examples."""
|
64 |
# This method needs to handle both single and multiple filepaths
|
65 |
# Adjust the logic based on how you want to load and yield data from your JSON files
|
|
|
66 |
id_ = 0
|
67 |
for filepath in filepaths:
|
68 |
# Load data from a single file
|