Update supported year list and base url
Browse files- AmericanStories.py +5 -7
AmericanStories.py
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
import json
|
2 |
import datasets
|
3 |
|
4 |
-
SUPPORTED_YEARS = ["1774"
|
5 |
-
|
6 |
-
SUPPORTED_YEARS = SUPPORTED_YEARS + [str(year) for year in range(1798, 1964)]
|
7 |
|
8 |
def make_year_file_splits():
|
9 |
"""
|
@@ -14,9 +13,8 @@ def make_year_file_splits():
|
|
14 |
list: A list of years.
|
15 |
"""
|
16 |
|
17 |
-
base_url = "https://huggingface.co/datasets/dell-research-harvard/AmericanStories/resolve/
|
18 |
|
19 |
-
# Make a list of years from 1774 to 1960
|
20 |
# TODO: can we set up to check the actual files in the repo instead of relying on the offline list?
|
21 |
year_list = SUPPORTED_YEARS
|
22 |
data_files = [f"faro_{year}.tar.gz" for year in year_list]
|
@@ -29,7 +27,7 @@ def make_year_file_splits():
|
|
29 |
|
30 |
|
31 |
_CITATION = """\
|
32 |
-
|
33 |
"""
|
34 |
|
35 |
_DESCRIPTION = """\
|
@@ -56,7 +54,7 @@ class CustomBuilderConfig(datasets.BuilderConfig):
|
|
56 |
class AmericanStories(datasets.GeneratorBasedBuilder):
|
57 |
"""Dataset builder class for AmericanStories dataset."""
|
58 |
|
59 |
-
VERSION = datasets.Version("0.
|
60 |
|
61 |
BUILDER_CONFIGS = [
|
62 |
CustomBuilderConfig(
|
|
|
1 |
import json
|
2 |
import datasets
|
3 |
|
4 |
+
SUPPORTED_YEARS = ["1770", "1771", "1772", "1773", "1774", "1777", "1778, "1779",
|
5 |
+
"1791", "1792", "1793"] + [str(year) for year in range(1796, 1964+1)]
|
|
|
6 |
|
7 |
def make_year_file_splits():
|
8 |
"""
|
|
|
13 |
list: A list of years.
|
14 |
"""
|
15 |
|
16 |
+
base_url = "https://huggingface.co/datasets/dell-research-harvard/AmericanStories/resolve/main/"
|
17 |
|
|
|
18 |
# TODO: can we set up to check the actual files in the repo instead of relying on the offline list?
|
19 |
year_list = SUPPORTED_YEARS
|
20 |
data_files = [f"faro_{year}.tar.gz" for year in year_list]
|
|
|
27 |
|
28 |
|
29 |
_CITATION = """\
|
30 |
+
@misc{dell2023american, title={American Stories: A Large-Scale Structured Text Dataset of Historical U.S. Newspapers}, author={Melissa Dell and Jacob Carlson and Tom Bryan and Emily Silcock and Abhishek Arora and Zejiang Shen and Luca D'Amico-Wong and Quan Le and Pablo Querubin and Leander Heldring}, year={2023}, eprint={2308.12477}, archivePrefix={arXiv}, primaryClass={cs.CL} }
|
31 |
"""
|
32 |
|
33 |
_DESCRIPTION = """\
|
|
|
54 |
class AmericanStories(datasets.GeneratorBasedBuilder):
|
55 |
"""Dataset builder class for AmericanStories dataset."""
|
56 |
|
57 |
+
VERSION = datasets.Version("0.2.0")
|
58 |
|
59 |
BUILDER_CONFIGS = [
|
60 |
CustomBuilderConfig(
|