96abhishekarora
commited on
Commit
•
806a21e
1
Parent(s):
bcce1d0
changed_loader
Browse files- .gitattributes +166 -0
- AmericanStories.py +12 -4
.gitattributes
CHANGED
@@ -55,3 +55,169 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
55 |
.tar.gz filter=lfs diff=lfs merge=lfs -text
|
56 |
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
57 |
faro_1799.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
.tar.gz filter=lfs diff=lfs merge=lfs -text
|
56 |
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
57 |
faro_1799.tar.gz filter=lfs diff=lfs merge=lfs -text
|
58 |
+
faro_1959.tar.gz filter=lfs diff=lfs merge=lfs -text
|
59 |
+
faro_1774.tar.gz filter=lfs diff=lfs merge=lfs -text
|
60 |
+
faro_1800.tar.gz filter=lfs diff=lfs merge=lfs -text
|
61 |
+
faro_1821.tar.gz filter=lfs diff=lfs merge=lfs -text
|
62 |
+
faro_1876.tar.gz filter=lfs diff=lfs merge=lfs -text
|
63 |
+
faro_1925.tar.gz filter=lfs diff=lfs merge=lfs -text
|
64 |
+
faro_1932.tar.gz filter=lfs diff=lfs merge=lfs -text
|
65 |
+
faro_1823.tar.gz filter=lfs diff=lfs merge=lfs -text
|
66 |
+
faro_1854.tar.gz filter=lfs diff=lfs merge=lfs -text
|
67 |
+
faro_1927.tar.gz filter=lfs diff=lfs merge=lfs -text
|
68 |
+
faro_1928.tar.gz filter=lfs diff=lfs merge=lfs -text
|
69 |
+
faro_1857.tar.gz filter=lfs diff=lfs merge=lfs -text
|
70 |
+
faro_1950.tar.gz filter=lfs diff=lfs merge=lfs -text
|
71 |
+
faro_1884.tar.gz filter=lfs diff=lfs merge=lfs -text
|
72 |
+
faro_1909.tar.gz filter=lfs diff=lfs merge=lfs -text
|
73 |
+
faro_1917.tar.gz filter=lfs diff=lfs merge=lfs -text
|
74 |
+
faro_1827.tar.gz filter=lfs diff=lfs merge=lfs -text
|
75 |
+
faro_1835.tar.gz filter=lfs diff=lfs merge=lfs -text
|
76 |
+
faro_1838.tar.gz filter=lfs diff=lfs merge=lfs -text
|
77 |
+
faro_1872.tar.gz filter=lfs diff=lfs merge=lfs -text
|
78 |
+
faro_1896.tar.gz filter=lfs diff=lfs merge=lfs -text
|
79 |
+
faro_1963.tar.gz filter=lfs diff=lfs merge=lfs -text
|
80 |
+
faro_1824.tar.gz filter=lfs diff=lfs merge=lfs -text
|
81 |
+
faro_1825.tar.gz filter=lfs diff=lfs merge=lfs -text
|
82 |
+
faro_1847.tar.gz filter=lfs diff=lfs merge=lfs -text
|
83 |
+
faro_1883.tar.gz filter=lfs diff=lfs merge=lfs -text
|
84 |
+
faro_1886.tar.gz filter=lfs diff=lfs merge=lfs -text
|
85 |
+
faro_1891.tar.gz filter=lfs diff=lfs merge=lfs -text
|
86 |
+
faro_1957.tar.gz filter=lfs diff=lfs merge=lfs -text
|
87 |
+
faro_1832.tar.gz filter=lfs diff=lfs merge=lfs -text
|
88 |
+
faro_1842.tar.gz filter=lfs diff=lfs merge=lfs -text
|
89 |
+
faro_1861.tar.gz filter=lfs diff=lfs merge=lfs -text
|
90 |
+
faro_1863.tar.gz filter=lfs diff=lfs merge=lfs -text
|
91 |
+
faro_1931.tar.gz filter=lfs diff=lfs merge=lfs -text
|
92 |
+
faro_1955.tar.gz filter=lfs diff=lfs merge=lfs -text
|
93 |
+
faro_1962.tar.gz filter=lfs diff=lfs merge=lfs -text
|
94 |
+
faro_1805.tar.gz filter=lfs diff=lfs merge=lfs -text
|
95 |
+
faro_1839.tar.gz filter=lfs diff=lfs merge=lfs -text
|
96 |
+
faro_1874.tar.gz filter=lfs diff=lfs merge=lfs -text
|
97 |
+
faro_1885.tar.gz filter=lfs diff=lfs merge=lfs -text
|
98 |
+
faro_1905.tar.gz filter=lfs diff=lfs merge=lfs -text
|
99 |
+
faro_1915.tar.gz filter=lfs diff=lfs merge=lfs -text
|
100 |
+
faro_1834.tar.gz filter=lfs diff=lfs merge=lfs -text
|
101 |
+
faro_1837.tar.gz filter=lfs diff=lfs merge=lfs -text
|
102 |
+
faro_1845.tar.gz filter=lfs diff=lfs merge=lfs -text
|
103 |
+
faro_1877.tar.gz filter=lfs diff=lfs merge=lfs -text
|
104 |
+
faro_1899.tar.gz filter=lfs diff=lfs merge=lfs -text
|
105 |
+
faro_1956.tar.gz filter=lfs diff=lfs merge=lfs -text
|
106 |
+
faro_1864.tar.gz filter=lfs diff=lfs merge=lfs -text
|
107 |
+
faro_1882.tar.gz filter=lfs diff=lfs merge=lfs -text
|
108 |
+
faro_1900.tar.gz filter=lfs diff=lfs merge=lfs -text
|
109 |
+
faro_1918.tar.gz filter=lfs diff=lfs merge=lfs -text
|
110 |
+
faro_1849.tar.gz filter=lfs diff=lfs merge=lfs -text
|
111 |
+
faro_1856.tar.gz filter=lfs diff=lfs merge=lfs -text
|
112 |
+
faro_1897.tar.gz filter=lfs diff=lfs merge=lfs -text
|
113 |
+
faro_1921.tar.gz filter=lfs diff=lfs merge=lfs -text
|
114 |
+
faro_1944.tar.gz filter=lfs diff=lfs merge=lfs -text
|
115 |
+
faro_1806.tar.gz filter=lfs diff=lfs merge=lfs -text
|
116 |
+
faro_1873.tar.gz filter=lfs diff=lfs merge=lfs -text
|
117 |
+
faro_1893.tar.gz filter=lfs diff=lfs merge=lfs -text
|
118 |
+
faro_1902.tar.gz filter=lfs diff=lfs merge=lfs -text
|
119 |
+
faro_1911.tar.gz filter=lfs diff=lfs merge=lfs -text
|
120 |
+
faro_1912.tar.gz filter=lfs diff=lfs merge=lfs -text
|
121 |
+
faro_1907.tar.gz filter=lfs diff=lfs merge=lfs -text
|
122 |
+
faro_1919.tar.gz filter=lfs diff=lfs merge=lfs -text
|
123 |
+
faro_1941.tar.gz filter=lfs diff=lfs merge=lfs -text
|
124 |
+
faro_1961.tar.gz filter=lfs diff=lfs merge=lfs -text
|
125 |
+
faro_1828.tar.gz filter=lfs diff=lfs merge=lfs -text
|
126 |
+
faro_1844.tar.gz filter=lfs diff=lfs merge=lfs -text
|
127 |
+
faro_1953.tar.gz filter=lfs diff=lfs merge=lfs -text
|
128 |
+
faro_1924.tar.gz filter=lfs diff=lfs merge=lfs -text
|
129 |
+
faro_1952.tar.gz filter=lfs diff=lfs merge=lfs -text
|
130 |
+
faro_1803.tar.gz filter=lfs diff=lfs merge=lfs -text
|
131 |
+
faro_1804.tar.gz filter=lfs diff=lfs merge=lfs -text
|
132 |
+
faro_1819.tar.gz filter=lfs diff=lfs merge=lfs -text
|
133 |
+
faro_1867.tar.gz filter=lfs diff=lfs merge=lfs -text
|
134 |
+
faro_1870.tar.gz filter=lfs diff=lfs merge=lfs -text
|
135 |
+
faro_1892.tar.gz filter=lfs diff=lfs merge=lfs -text
|
136 |
+
faro_1811.tar.gz filter=lfs diff=lfs merge=lfs -text
|
137 |
+
faro_1812.tar.gz filter=lfs diff=lfs merge=lfs -text
|
138 |
+
faro_1841.tar.gz filter=lfs diff=lfs merge=lfs -text
|
139 |
+
faro_1879.tar.gz filter=lfs diff=lfs merge=lfs -text
|
140 |
+
faro_1923.tar.gz filter=lfs diff=lfs merge=lfs -text
|
141 |
+
faro_1937.tar.gz filter=lfs diff=lfs merge=lfs -text
|
142 |
+
faro_1926.tar.gz filter=lfs diff=lfs merge=lfs -text
|
143 |
+
faro_1929.tar.gz filter=lfs diff=lfs merge=lfs -text
|
144 |
+
faro_1829.tar.gz filter=lfs diff=lfs merge=lfs -text
|
145 |
+
faro_1846.tar.gz filter=lfs diff=lfs merge=lfs -text
|
146 |
+
faro_1889.tar.gz filter=lfs diff=lfs merge=lfs -text
|
147 |
+
faro_1910.tar.gz filter=lfs diff=lfs merge=lfs -text
|
148 |
+
faro_1920.tar.gz filter=lfs diff=lfs merge=lfs -text
|
149 |
+
faro_1922.tar.gz filter=lfs diff=lfs merge=lfs -text
|
150 |
+
faro_1945.tar.gz filter=lfs diff=lfs merge=lfs -text
|
151 |
+
faro_1949.tar.gz filter=lfs diff=lfs merge=lfs -text
|
152 |
+
faro_1808.tar.gz filter=lfs diff=lfs merge=lfs -text
|
153 |
+
faro_1809.tar.gz filter=lfs diff=lfs merge=lfs -text
|
154 |
+
faro_1875.tar.gz filter=lfs diff=lfs merge=lfs -text
|
155 |
+
faro_1880.tar.gz filter=lfs diff=lfs merge=lfs -text
|
156 |
+
faro_1859.tar.gz filter=lfs diff=lfs merge=lfs -text
|
157 |
+
faro_1865.tar.gz filter=lfs diff=lfs merge=lfs -text
|
158 |
+
faro_1822.tar.gz filter=lfs diff=lfs merge=lfs -text
|
159 |
+
faro_1916.tar.gz filter=lfs diff=lfs merge=lfs -text
|
160 |
+
faro_1938.tar.gz filter=lfs diff=lfs merge=lfs -text
|
161 |
+
faro_1951.tar.gz filter=lfs diff=lfs merge=lfs -text
|
162 |
+
faro_1943.tar.gz filter=lfs diff=lfs merge=lfs -text
|
163 |
+
faro_1831.tar.gz filter=lfs diff=lfs merge=lfs -text
|
164 |
+
faro_1833.tar.gz filter=lfs diff=lfs merge=lfs -text
|
165 |
+
faro_1852.tar.gz filter=lfs diff=lfs merge=lfs -text
|
166 |
+
faro_1868.tar.gz filter=lfs diff=lfs merge=lfs -text
|
167 |
+
faro_1890.tar.gz filter=lfs diff=lfs merge=lfs -text
|
168 |
+
faro_1894.tar.gz filter=lfs diff=lfs merge=lfs -text
|
169 |
+
faro_1869.tar.gz filter=lfs diff=lfs merge=lfs -text
|
170 |
+
faro_1906.tar.gz filter=lfs diff=lfs merge=lfs -text
|
171 |
+
faro_1930.tar.gz filter=lfs diff=lfs merge=lfs -text
|
172 |
+
faro_1939.tar.gz filter=lfs diff=lfs merge=lfs -text
|
173 |
+
faro_1942.tar.gz filter=lfs diff=lfs merge=lfs -text
|
174 |
+
faro_1960.tar.gz filter=lfs diff=lfs merge=lfs -text
|
175 |
+
faro_1813.tar.gz filter=lfs diff=lfs merge=lfs -text
|
176 |
+
faro_1843.tar.gz filter=lfs diff=lfs merge=lfs -text
|
177 |
+
faro_1862.tar.gz filter=lfs diff=lfs merge=lfs -text
|
178 |
+
faro_1895.tar.gz filter=lfs diff=lfs merge=lfs -text
|
179 |
+
faro_1940.tar.gz filter=lfs diff=lfs merge=lfs -text
|
180 |
+
faro_1946.tar.gz filter=lfs diff=lfs merge=lfs -text
|
181 |
+
faro_1816.tar.gz filter=lfs diff=lfs merge=lfs -text
|
182 |
+
faro_1817.tar.gz filter=lfs diff=lfs merge=lfs -text
|
183 |
+
faro_1904.tar.gz filter=lfs diff=lfs merge=lfs -text
|
184 |
+
faro_1913.tar.gz filter=lfs diff=lfs merge=lfs -text
|
185 |
+
faro_1935.tar.gz filter=lfs diff=lfs merge=lfs -text
|
186 |
+
faro_1936.tar.gz filter=lfs diff=lfs merge=lfs -text
|
187 |
+
faro_1815.tar.gz filter=lfs diff=lfs merge=lfs -text
|
188 |
+
faro_1860.tar.gz filter=lfs diff=lfs merge=lfs -text
|
189 |
+
faro_1901.tar.gz filter=lfs diff=lfs merge=lfs -text
|
190 |
+
faro_1934.tar.gz filter=lfs diff=lfs merge=lfs -text
|
191 |
+
faro_1848.tar.gz filter=lfs diff=lfs merge=lfs -text
|
192 |
+
faro_1851.tar.gz filter=lfs diff=lfs merge=lfs -text
|
193 |
+
faro_1853.tar.gz filter=lfs diff=lfs merge=lfs -text
|
194 |
+
faro_1948.tar.gz filter=lfs diff=lfs merge=lfs -text
|
195 |
+
faro_1954.tar.gz filter=lfs diff=lfs merge=lfs -text
|
196 |
+
faro_1830.tar.gz filter=lfs diff=lfs merge=lfs -text
|
197 |
+
faro_1871.tar.gz filter=lfs diff=lfs merge=lfs -text
|
198 |
+
faro_1881.tar.gz filter=lfs diff=lfs merge=lfs -text
|
199 |
+
faro_1898.tar.gz filter=lfs diff=lfs merge=lfs -text
|
200 |
+
faro_1933.tar.gz filter=lfs diff=lfs merge=lfs -text
|
201 |
+
faro_1947.tar.gz filter=lfs diff=lfs merge=lfs -text
|
202 |
+
faro_1887.tar.gz filter=lfs diff=lfs merge=lfs -text
|
203 |
+
faro_1903.tar.gz filter=lfs diff=lfs merge=lfs -text
|
204 |
+
faro_1914.tar.gz filter=lfs diff=lfs merge=lfs -text
|
205 |
+
faro_1818.tar.gz filter=lfs diff=lfs merge=lfs -text
|
206 |
+
faro_1836.tar.gz filter=lfs diff=lfs merge=lfs -text
|
207 |
+
faro_1840.tar.gz filter=lfs diff=lfs merge=lfs -text
|
208 |
+
faro_1858.tar.gz filter=lfs diff=lfs merge=lfs -text
|
209 |
+
faro_1888.tar.gz filter=lfs diff=lfs merge=lfs -text
|
210 |
+
faro_1826.tar.gz filter=lfs diff=lfs merge=lfs -text
|
211 |
+
faro_1855.tar.gz filter=lfs diff=lfs merge=lfs -text
|
212 |
+
faro_1878.tar.gz filter=lfs diff=lfs merge=lfs -text
|
213 |
+
faro_1958.tar.gz filter=lfs diff=lfs merge=lfs -text
|
214 |
+
faro_1798.tar.gz filter=lfs diff=lfs merge=lfs -text
|
215 |
+
faro_1801.tar.gz filter=lfs diff=lfs merge=lfs -text
|
216 |
+
faro_1802.tar.gz filter=lfs diff=lfs merge=lfs -text
|
217 |
+
faro_1810.tar.gz filter=lfs diff=lfs merge=lfs -text
|
218 |
+
faro_1820.tar.gz filter=lfs diff=lfs merge=lfs -text
|
219 |
+
faro_1850.tar.gz filter=lfs diff=lfs merge=lfs -text
|
220 |
+
faro_1807.tar.gz filter=lfs diff=lfs merge=lfs -text
|
221 |
+
faro_1814.tar.gz filter=lfs diff=lfs merge=lfs -text
|
222 |
+
faro_1866.tar.gz filter=lfs diff=lfs merge=lfs -text
|
223 |
+
faro_1908.tar.gz filter=lfs diff=lfs merge=lfs -text
|
AmericanStories.py
CHANGED
@@ -10,7 +10,7 @@ _DESCRIPTION = """\
|
|
10 |
American Stories offers high-quality structured data from historical newspapers suitable for pre-training large language models to enhance the understanding of historical English and world knowledge. It can also be integrated into external databases of retrieval-augmented language models, enabling broader access to historical information, including interpretations of political events and intricate details about people's ancestors. Additionally, the structured article texts facilitate the application of transformer-based methods for popular tasks like detecting reproduced content, significantly improving accuracy compared to traditional OCR methods. American Stories serves as a substantial and valuable dataset for advancing multimodal layout analysis models and other multimodal applications.
|
11 |
"""
|
12 |
|
13 |
-
class
|
14 |
VERSION = "0.0.1"
|
15 |
|
16 |
BUILDER_CONFIGS = [
|
@@ -33,9 +33,17 @@ class YourDatasetName(DatasetBuilder):
|
|
33 |
citation=_CITATION,
|
34 |
)
|
35 |
|
36 |
-
def _split_generators(self, dl_manager
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
def _generate_examples(self, filepath: str) -> Iterator[datasets.Example]:
|
41 |
with tarfile.open(filepath, "r:gz") as tar:
|
|
|
10 |
American Stories offers high-quality structured data from historical newspapers suitable for pre-training large language models to enhance the understanding of historical English and world knowledge. It can also be integrated into external databases of retrieval-augmented language models, enabling broader access to historical information, including interpretations of political events and intricate details about people's ancestors. Additionally, the structured article texts facilitate the application of transformer-based methods for popular tasks like detecting reproduced content, significantly improving accuracy compared to traditional OCR methods. American Stories serves as a substantial and valuable dataset for advancing multimodal layout analysis models and other multimodal applications.
|
11 |
"""
|
12 |
|
13 |
+
class AmericanStories(DatasetBuilder):
|
14 |
VERSION = "0.0.1"
|
15 |
|
16 |
BUILDER_CONFIGS = [
|
|
|
33 |
citation=_CITATION,
|
34 |
)
|
35 |
|
36 |
+
def _split_generators(self, dl_manager):
|
37 |
+
data_files = [
|
38 |
+
os.path.join(self.data_dir, filename)
|
39 |
+
for filename in os.listdir(self.data_dir)
|
40 |
+
if filename.endswith(".tar.gz")
|
41 |
+
]
|
42 |
+
|
43 |
+
return [
|
44 |
+
self._generate_examples(data_file)
|
45 |
+
for data_file in data_files
|
46 |
+
]
|
47 |
|
48 |
def _generate_examples(self, filepath: str) -> Iterator[datasets.Example]:
|
49 |
with tarfile.open(filepath, "r:gz") as tar:
|