96abhishekarora
commited on
Commit
•
040b1a0
1
Parent(s):
a52ead7
modified url dict
Browse files- AmericanStories.py +11 -1
AmericanStories.py
CHANGED
@@ -30,6 +30,16 @@ def make_year_file_splits(data_dir):
|
|
30 |
years.append(year)
|
31 |
return splits, years
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
|
35 |
|
@@ -85,7 +95,7 @@ class AmericanStories(datasets.GeneratorBasedBuilder):
|
|
85 |
name="subset_years",
|
86 |
version=VERSION,
|
87 |
description="Subset of years in the dataset",
|
88 |
-
year_list=["1774"],
|
89 |
)]
|
90 |
|
91 |
DEFAULT_CONFIG_NAME = "subset_years" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
|
|
30 |
years.append(year)
|
31 |
return splits, years
|
32 |
|
33 |
+
def make_year_file_splits(data_dir):
|
34 |
+
base_url="https://huggingface.co/datasets/dell-research-harvard/AmericanStories/resolve/main/"
|
35 |
+
|
36 |
+
year_list=["1774","1804","1807"]
|
37 |
+
data_files=[f"faro_{year}.tar.gz" for year in year_list]
|
38 |
+
url_list=[base_url+file for file in data_files]
|
39 |
+
splits={year:file for year,file in zip(year_list,url_list)}
|
40 |
+
years=year_list
|
41 |
+
|
42 |
+
return splits, years
|
43 |
|
44 |
|
45 |
|
|
|
95 |
name="subset_years",
|
96 |
version=VERSION,
|
97 |
description="Subset of years in the dataset",
|
98 |
+
year_list=["1774","1804"],
|
99 |
)]
|
100 |
|
101 |
DEFAULT_CONFIG_NAME = "subset_years" # It's not mandatory to have a default configuration. Just use one if it make sense.
|