meettilavat commited on
Commit
81f9d19
·
verified ·
1 Parent(s): 343cdb4

Add files using upload-large-folder tool

Browse files
.ipynb_checkpoints/.checkpoint-checkpoint.json ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "processed_shards": [
3
+ "./dataset/data/shard_00000.parquet",
4
+ "./dataset/data/shard_00001.parquet",
5
+ "./dataset/data/shard_00002.parquet",
6
+ "./dataset/data/shard_00003.parquet",
7
+ "./dataset/data/shard_00004.parquet",
8
+ "./dataset/data/shard_00005.parquet",
9
+ "./dataset/data/shard_00006.parquet",
10
+ "./dataset/data/shard_00007.parquet",
11
+ "./dataset/data/shard_00008.parquet",
12
+ "./dataset/data/shard_00009.parquet",
13
+ "./dataset/data/shard_00010.parquet",
14
+ "./dataset/data/shard_00011.parquet",
15
+ "./dataset/data/shard_00012.parquet",
16
+ "./dataset/data/shard_00013.parquet",
17
+ "./dataset/data/shard_00014.parquet",
18
+ "./dataset/data/shard_00015.parquet",
19
+ "./dataset/data/shard_00016.parquet",
20
+ "./dataset/data/shard_00017.parquet",
21
+ "./dataset/data/shard_00018.parquet",
22
+ "./dataset/data/shard_00019.parquet",
23
+ "./dataset/data/shard_00020.parquet",
24
+ "./dataset/data/shard_00021.parquet",
25
+ "./dataset/data/shard_00022.parquet",
26
+ "./dataset/data/shard_00023.parquet",
27
+ "./dataset/data/shard_00024.parquet",
28
+ "./dataset/data/shard_00025.parquet",
29
+ "./dataset/data/shard_00026.parquet",
30
+ "./dataset/data/shard_00027.parquet",
31
+ "./dataset/data/shard_00028.parquet",
32
+ "./dataset/data/shard_00029.parquet",
33
+ "./dataset/data/shard_00030.parquet",
34
+ "./dataset/data/shard_00031.parquet",
35
+ "./dataset/data/shard_00032.parquet",
36
+ "./dataset/data/shard_00033.parquet",
37
+ "./dataset/data/shard_00034.parquet",
38
+ "./dataset/data/shard_00035.parquet",
39
+ "./dataset/data/shard_00036.parquet",
40
+ "./dataset/data/shard_00037.parquet",
41
+ "./dataset/data/shard_00038.parquet",
42
+ "./dataset/data/shard_00039.parquet",
43
+ "./dataset/data/shard_00040.parquet",
44
+ "./dataset/data/shard_00041.parquet",
45
+ "./dataset/data/shard_00042.parquet",
46
+ "./dataset/data/shard_00043.parquet",
47
+ "./dataset/data/shard_00044.parquet",
48
+ "./dataset/data/shard_00045.parquet",
49
+ "./dataset/data/shard_00046.parquet",
50
+ "./dataset/data/shard_00047.parquet",
51
+ "./dataset/data/shard_00048.parquet",
52
+ "./dataset/data/shard_00049.parquet",
53
+ "./dataset/data/shard_00050.parquet",
54
+ "./dataset/data/shard_00051.parquet",
55
+ "./dataset/data/shard_00052.parquet",
56
+ "./dataset/data/shard_00053.parquet",
57
+ "./dataset/data/shard_00054.parquet",
58
+ "./dataset/data/shard_00055.parquet",
59
+ "./dataset/data/shard_00056.parquet",
60
+ "./dataset/data/shard_00057.parquet",
61
+ "./dataset/data/shard_00058.parquet",
62
+ "./dataset/data/shard_00059.parquet",
63
+ "./dataset/data/shard_00060.parquet",
64
+ "./dataset/data/shard_00061.parquet",
65
+ "./dataset/data/shard_00062.parquet",
66
+ "./dataset/data/shard_00063.parquet",
67
+ "./dataset/data/shard_00064.parquet",
68
+ "./dataset/data/shard_00065.parquet",
69
+ "./dataset/data/shard_00066.parquet",
70
+ "./dataset/data/shard_00067.parquet",
71
+ "./dataset/data/shard_00068.parquet",
72
+ "./dataset/data/shard_00069.parquet",
73
+ "./dataset/data/shard_00070.parquet",
74
+ "./dataset/data/shard_00071.parquet",
75
+ "./dataset/data/shard_00072.parquet",
76
+ "./dataset/data/shard_00073.parquet",
77
+ "./dataset/data/shard_00074.parquet",
78
+ "./dataset/data/shard_00075.parquet",
79
+ "./dataset/data/shard_00076.parquet",
80
+ "./dataset/data/shard_00077.parquet",
81
+ "./dataset/data/shard_00078.parquet",
82
+ "./dataset/data/shard_00079.parquet",
83
+ "./dataset/data/shard_00080.parquet",
84
+ "./dataset/data/shard_00081.parquet",
85
+ "./dataset/data/shard_00082.parquet",
86
+ "./dataset/data/shard_00083.parquet",
87
+ "/workspace/dataset/data/shard_00084.parquet",
88
+ "/workspace/dataset/data/shard_00085.parquet",
89
+ "/workspace/dataset/data/shard_00086.parquet",
90
+ "/workspace/dataset/data/shard_00087.parquet",
91
+ "/workspace/dataset/data/shard_00088.parquet",
92
+ "/workspace/dataset/data/shard_00089.parquet",
93
+ "/workspace/dataset/data/shard_00090.parquet",
94
+ "/workspace/dataset/data/shard_00091.parquet",
95
+ "/workspace/dataset/data/shard_00092.parquet",
96
+ "/workspace/dataset/data/shard_00093.parquet"
97
+ ],
98
+ "output_shard_index": 603,
99
+ "total_chunks": 41040470,
100
+ "total_chars": 149871325659,
101
+ "total_books": 96256
102
+ }
README.md ADDED
@@ -0,0 +1,558 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: Internet Archive Historical Texts - Chunked (0001-1899)
3
+ tags:
4
+ - internet-archive
5
+ - historical-texts
6
+ - ocr
7
+ - pre-training
8
+ language:
9
+ - en
10
+ task_categories:
11
+ - text-generation
12
+ size_categories:
13
+ - 100M<n<1B
14
+ license: other
15
+ ---
16
+
17
+ # Internet Archive Historical Texts - Chunked (0001-1899)
18
+
19
+ ## TL;DR
20
+ - **163 million** text chunks extracted from historical public-domain documents sourced from the Internet Archive
21
+ - Content dated **0001-1899**, sorted by download popularity to prioritize high-quality, frequently accessed materials
22
+ - **2,445** Zstandard-compressed Parquet shards totaling **~217 GB** on disk, **~594 billion** characters uncompressed
23
+ - Optimized chunk size of **~3,600 characters** (target: 4,000) for efficient language model training
24
+ - Cleaned OCR text with disclaimer removal, artifact filtering, and whitespace normalization
25
+ - Primarily **English** content with traces of other European languages
26
+
27
+ ## Quick Stats
28
+
29
+ | Metric | Value |
30
+ |--------|-------|
31
+ | Total text chunks | ~163,365,120 |
32
+ | Total characters | ~593,707,573,963 (593.7B) |
33
+ | Parquet shards | 2,445 |
34
+ | On-disk size (compressed) | 216.9 GB |
35
+ | Average chunk size | 3,634 chars |
36
+ | Median chunk size | 3,808 chars |
37
+ | Chunk size range | 102 - 7,928 chars |
38
+ | Target chunk size | 4,000 chars |
39
+ | Primary language | English (~97%) |
40
+
41
+ ## Dataset Description
42
+
43
+ ### Overview
44
+ This dataset contains chunked historical texts from the Internet Archive, preprocessed for language model training. The source materials span from year 0001 to 1899 and were selected based on download counts to ensure quality and relevance. Long documents have been split into manageable chunks of approximately 4,000 characters each, making the dataset ideal for:
45
+
46
+ - **Pre-training** language models on historical English text
47
+ - **Fine-tuning** models for historical document understanding
48
+ - **Historical NLP** research and analysis
49
+ - **OCR quality** assessment and improvement
50
+
51
+ ### Chunk Statistics
52
+
53
+ | Percentile | Chunk Size (chars) |
54
+ |------------|-------------------|
55
+ | P25 | 3,497 |
56
+ | P50 (Median) | 3,808 |
57
+ | P75 | 3,948 |
58
+ | P90 | 3,987 |
59
+ | P95 | 3,996 |
60
+ | P99 | 4,002 |
61
+
62
+ The distribution shows most chunks cluster around the 4,000 character target, with a small tail of shorter chunks from the end of documents or naturally brief sections.
63
+
64
+ ### Data Format
65
+
66
+ Each Parquet shard contains:
67
+ - **Column**: `text` (string)
68
+ - **Row group size**: 1,024 rows
69
+ - **Compression**: Zstandard (level 3)
70
+ - **Typical chunks per shard**: 60,000-70,000
71
+
72
+ Files are named sequentially: `shard_00000.parquet` through `shard_02444.parquet`
73
+
74
+ ## Preprocessing Pipeline
75
+
76
+ The dataset underwent extensive cleaning to maximize quality:
77
+
78
+ 1. **Disclaimer Removal**: Stripped Internet Archive, Google Books, and JSTOR boilerplate
79
+ 2. **OCR Artifact Filtering**: Removed page numbers, annotations, and noise patterns
80
+ 3. **Text Normalization**: Standardized whitespace, fixed common OCR errors
81
+ 4. **Quality Filters**:
82
+ - Minimum chunk length: 100 characters
83
+ - Chunks split at natural paragraph boundaries when possible
84
+ - Aggressive deduplication of boilerplate content
85
+ 5. **Chunking Strategy**:
86
+ - Target size: 4,000 characters
87
+ - Smart splitting on paragraph breaks to preserve context
88
+ - Large paragraphs split on sentence boundaries
89
+ - Minimum chunk size enforced to avoid fragmentary text
90
+
91
+ ## Content Examples
92
+
93
+ The following are real, unedited samples from the dataset showing the variety of content and text quality:
94
+
95
+ ### Example 1: Literary - Historical Poetry (Edmund Spenser's Epithalamion)
96
+ ```
97
+ Ring ye the bells, ye yong men of the tow no.
98
+ And leave your wonted labors for this day :
99
+ This day is holy - do ye write it downe,
100
+ That ye for ever it remember may, -
101
+ This day the sun is in his chiefest hight,
102
+ With Barnaby the bright.
103
+ From whence declining daily by degrees,
104
+ He somewhat loseth of his heat and light,
105
+ When once the Crab behind his back he see.«
106
+ But for this time it ill -ordained was
107
+ POEMS OF LOVE.
108
+
109
+ To choose the longest day in all the yeare,
110
+ A.nd shortest night, when longest fitter
111
+ weare ;
112
+ Yet never day so long but late would passe.
113
+ Ring ye the hells, to make it weare away,
114
+ And bonfires make all day ;
115
+ And daunce about them, and about them sing,
116
+ That all the woods may answer, and theyr echo ring.
117
+ ```
118
+
119
+ ### Example 2: Literary Criticism - Analysis of Historical Writing Style
120
+ ```
121
+ Often does he declare that he purposely varies his diction,
122
+ lest the reader should be disgusted by its sameness; anx-
123
+ iously careful to avoid repetition, even in the structure of his
124
+ phrases. It may be said, however, that generally, in his
125
+ earlier works, (for he was apparently very young when he
126
+ wrote his History of the Kings,) his style is rather laboured ;
127
+ though, perhaps, even this may have originated in an anxiety
128
+ that his descriptions should be full ; or, to use his own ex-
129
+ pression, that posterity should be wholly and perfectly in-
130
+ formed. That his diction is liighly antithetical, and his
131
+ sentences artfully poised, will be readily allowed; and per-
132
+ haps the best index to his meaning, where he may be occa-
133
+ sionally obscure, is the nicely-adjusted balance of his phrase.
134
+ That he gradually improved his style, and in riper years,
135
+ where he describes the transactions of his own times, became
136
+ terse, elegant, and polished, no one will attempt to dispute.
137
+ ```
138
+
139
+ ### Example 3: Religious/Historical - Biography of Father Gallitzin
140
+ ```
141
+ There was one person, much nearer the scene of action,
142
+ who alone appears to have had the necessary force and firm-
143
+ ness, the indomitable courage, and the all-mastering will to
144
+ face and to thoroughly conquer the storm the others dared
145
+ not meet; it was the place for Father Gallitzin's immense
146
+ faith and magnificent spirit; he alone appears endowed with
147
+ that lion like nature, fortified by long trials and experienced
148
+ in the wickedness of rebellious man,-, inspired and strength-
149
+ ened beyond all human force by the battle cry forever in his
150
+ ears : God wills it, which fears not, single handed, to meet a
151
+ legion of enemies. But a superior wisdom so ordered it that
152
+ the evil thing should have its day and run its course.
153
+ ```
154
+
155
+ ### Example 4: Historical Legal Text - Irish and European Land Tenure
156
+ ```
157
+ The Irish, tenures throw considerable light upon many ob-
158
+ onThoseof* scure points in the tenures of the rest of Europe in medieval
159
+ Europe, times ; for instance there can be no doubt that hereditary tenan-
160
+ cies, the " Erbpacht" of the Germans, and the Emphyteusis of
161
+ the later Roman Empire, co-existed all through the middle ages
162
+ in Italy, Germany, France, and Flanders, with a system of
163
+ villenage analogous to the Irish Fuidirship. Marini and
164
+ Mabillon mention tenants of the former class under the name
165
+ of libellarii from the sixth to the thirteenth centuries;351
166
+ they were numerous also in Germany in the ninth century.
167
+
168
+ The greater part of the occupiers of land in France in the ninth
169
+ century were in the position of Ceiles, holding by limited ser-
170
+ vice, is proved by documents forbidding the raising of rents.
171
+ The serfs proper we know held their land in the greater part
172
+ of Germany as an inheritance from the thirteenth century.355
173
+ ```
174
+
175
+ ### Example 5: Biographical - Judge Sir John Williams
176
+ ```
177
+ {)ublic at large became aware of his match-
178
+ ess talents in that branch of an advocate's
179
+ duty. Professional success followed "the
180
+ Queen's trial." Mr. Williams then got into
181
+ Parliament, sitting for Lincoln, Winchel-
182
+ sea, and Ilchester, on the Liberal interest,
183
+ and distinguished his Parliamentary career
184
+ by his advocacy of Chancery Reform. A
185
+ change of the Ministry at length procured
186
+ for him that professional position to which
187
+ he had been for some years fairly entitled.
188
+ He received a silk gown, and soon after
189
+ the accession of William IV her Majesty,
190
+ now Queen Dowager, appointed him her
191
+ Attorney-General. In Feb. 1834 he be-
192
+ came one of the Barons of the Exche-
193
+ quer, and having sat in that court only
194
+ one term was transferred to the Court of
195
+ King's Bench, where he remained until
196
+ the period of his lamented death.
197
+ ```
198
+
199
+ ### Example 6: Technical - Railroad Coupler Specifications (1899)
200
+ ```
201
+ 3. To propose specifications for couplers. This part of the subject has received
202
+ very careful consideration. It has been difficult to reconcile the diametrically
203
+ opposite opinions which have been expressed by various railroad men and manu-
204
+ facturers. It is believed, however, that rigid specifications and tests will do much
205
+ to weed out the poorer makes of couplers at present being furnished, and it is rec-
206
+ ommended that in the future all couplers be purchased subject to the provisions of
207
+ the following standard specifications and tests.
208
+
209
+ A. B. &• C. R. R. CO.
210
+ Specifications for M. C. B. Automatic Car Couplers.
211
+
212
+ After September 1, 1899, aH M. C. B. automatic car couplers purchased by or
213
+ used in the construction of cars for the above-named company must meet the require-
214
+ ments of the following specifications.
215
+ ```
216
+
217
+ ### Example 7: Theological - Church Doctrine Discussion
218
+ ```
219
+ teacheth, that in this mystery there is not in the bread a substantial
220
+ but a sacramental change, according to the which the outward ele-
221
+ ments take the name of what they represent, and are changed in
222
+ such a sort that they still retain their former natural substance.
223
+ "The bread," saith he, "is made worthy to be honoured with the
224
+ name of the Flesh of Christ by the consecration of the priest, yet the
225
+ Flesh retains the proprieties of its incorruptible nature, as the bread
226
+ doth its natural substance. Before the bread be sanctified, we call
227
+ it bread; but, when it is consecrated by the divine grace, it deserves
228
+ to be called the Lord's Body, though the substance of the bread still
229
+ remains'."' When Bellarmine could not answer this testimony of
230
+ that great doctor, he thought it enough to deny that this epistle is
231
+ S. Chrysostom's'*: but both he and Possevin do vainly contend that
232
+ it is not extant among the works of Chrysostom.
233
+ ```
234
+
235
+ ### Example 8: Literary - 19th Century Novel (Character Description)
236
+ ```
237
+ Had she been less evenly balanced, had her
238
+ soul been less true, her heart less tender, she
239
+ might in time have frozen the woman complete!),
240
+ and crystallized into the artiste only - or - but
241
+ to think of Judith Moore sullying her wings is
242
+ sacrilege.
243
+
244
+ She was full of womanly tenderness and
245
+ womanly vanities. She had a thousand little
246
+ tricks of coquetry and as many balms to care
247
+ their smart. She took a good deal of satis fac
248
+ tion out of her pretty gowns and her finger
249
+ nails, and the contemplation of her little feet
250
+ becomingly shod had been known to dry her
251
+ tears. She was essentially the woman of the
252
+ past, the woman who created a " type " distinct
253
+ from man; the womanly woman, not the hybrid
254
+ creature of modern cultivation ; the woman of
255
+ romance.
256
+ ```
257
+
258
+ ### Example 9: Historical Records - Marriage Registry (OCR artifacts visible)
259
+ ```
260
+ Michael Darey and Aan Cusack.
261
+ George Omensetter and Margaret Sainer.
262
+ Wilhehn Denzel, wid% and Elizabeth Jansou.
263
+ Thomas Butbis and Pattj" Post.
264
+ Peter Lengfelder and Barbara Birkenbeiler.
265
+ Andrew McFarlene, wid% and Sarah Lakorn, wid.
266
+ Carl Himmelreich and Susanna Funck.
267
+ John Tallentire and Elizabeth Shade.
268
+ Joseph Bolton and Sarah Hofty.
269
+ George Fried. Wendt and Sarah Charlotte Eichbaum.
270
+ Jacob Chur, wid^ and Wendeling Margar. Dorneck.
271
+ Adam Hyner and Elizabeth Wears (Wehrs).
272
+ Gideon Cox and Susanna Shevely.
273
+ ```
274
+ *Note: "wid%" artifacts are OCR errors for "widower" or "widow"*
275
+
276
+ ### Example 10: Reference/Directory - Business Listings (1899)
277
+ ```
278
+ STORES, OFFICES AND LOFTS.
279
+ BUFFALO, N Y. - Wood & Bradne/
280
+ Mutual Life Bldg. Buffalo, have plans In
281
+ progress for remodeling the 5-sty brick
282
+ business block, 35x200, to include stores,
283
+ offices, arcade billiard and pool room, at
284
+ 319 Main st, through from Main to Wash-
285
+ ington sts. for Dr. and Conrad E. Witt-
286
+ laufer, 1234 Delaware av, Buffalo, owne'\
287
+ ROCHESTER, N. Y. - Gordon & Madden.
288
+ 300 Sibley Block, Rochester, have work-
289
+ ing plans in progress for addition to the
290
+ 2-sty brick and tile School No. 27, in Cen-
291
+ tral Park, cor 1st st, for the City of Roch-
292
+ ester, Board of Education, J. S. Mullen, 37
293
+ Exchange st, Rochester, owner. Cost, $16,000.
294
+ ```
295
+
296
+ ### Example 11: Historical Encyclopedia - Roman Emperor Diocletian
297
+ ```
298
+ DiocLrnixcs. Caios Valerius Jovtus, a cele-
299
+ brated Roman emperor, born of an obscure family ia
300
+ Dalmatia, at the town of Dioclea or Doclea, from
301
+ which town be derived bis first name, which was
302
+ probably Doclea, afterward lengthened to the more
303
+ harmonious Greek form of Dioclea, and at length,
304
+ after his accession to the empire, to the Roman form
305
+ of Diocleti&nus. He likewise, on this occasion, as-
306
+ sumed the patrician name of Valerius. Some, how-
307
+ ever, make him to nave been born at Salona. Hie
308
+ birth year also i» differently given. The common
309
+ account says 245 A.D., but other statements make
310
+ bin tea years older. He waa first a common soldier,
311
+ and by merit and success gradually rose to rank.
312
+ ```
313
+
314
+ ### Example 12: Poetry - Personification of Winter
315
+ ```
316
+ Some call me their foe, but I hone and intend
317
+ To make it appear, I am truly your friend ;
318
+ You may think mv deportment is furly and bluff,
319
+ But I mean it for good when I handle you rough.
320
+
321
+ My fnow when descending it covers your fields,
322
+ The beft of manuring confcftdly yields.
323
+ While its fmooth fhiuing furface aiiords you a fpace
324
+ For your fleighs and your fledges to drive at full chace.
325
+
326
+ My ice, how reviving in heat does it feem,
327
+ It cools all your liquors and fwteten.s your cream ;
328
+ On ^Etna's tall fummit 'lis gadier'd, and thence
329
+ O'er Italy does its refrefhment difpeuf*.
330
+ ```
331
+ *Note: This example shows period spelling conventions and some OCR artifacts (fnow=snow, fpace=space)*
332
+
333
+ ## Usage
334
+
335
+ ### Loading the Dataset
336
+
337
+ #### Using PyArrow (Recommended)
338
+ ```python
339
+ import pyarrow.dataset as ds
340
+ import pyarrow.compute as pc
341
+
342
+ # Load all shards as a single dataset
343
+ dataset = ds.dataset("shard_*.parquet", format="parquet")
344
+
345
+ # Efficient streaming with multi-threading
346
+ scanner = dataset.scanner(
347
+ columns=["text"],
348
+ use_threads=True,
349
+ batch_size=4096
350
+ )
351
+
352
+ for batch in scanner.to_batches():
353
+ texts = batch["text"].to_pylist()
354
+ # Process texts...
355
+ ```
356
+
357
+ #### Using Pandas
358
+ ```python
359
+ import pandas as pd
360
+
361
+ # Load a single shard
362
+ df = pd.read_parquet("shard_00000.parquet")
363
+ print(df.head())
364
+
365
+ # Load all shards (requires sufficient RAM)
366
+ import glob
367
+ files = sorted(glob.glob("shard_*.parquet"))
368
+ df = pd.concat([pd.read_parquet(f) for f in files])
369
+ ```
370
+
371
+ #### Using HuggingFace Datasets
372
+ ```python
373
+ from datasets import load_dataset
374
+
375
+ # Load from local path
376
+ dataset = load_dataset("parquet", data_files="shard_*.parquet")
377
+
378
+ # Iterate efficiently
379
+ for example in dataset["train"]:
380
+ text = example["text"]
381
+ # Process text...
382
+ ```
383
+
384
+ ### Computing Statistics
385
+
386
+ Quick script to verify the dataset:
387
+ ```python
388
+ import pyarrow.dataset as ds
389
+ import pyarrow.compute as pc
390
+
391
+ dataset = ds.dataset("shard_*.parquet", format="parquet")
392
+ scanner = dataset.scanner(columns=["text"], use_threads=True)
393
+
394
+ count = 0
395
+ total_chars = 0
396
+
397
+ for batch in scanner.to_batches():
398
+ lengths = pc.utf8_length(batch["text"])
399
+ count += batch.num_rows
400
+ total_chars += pc.sum(lengths).as_py()
401
+
402
+ print(f"Chunks: {count:,}")
403
+ print(f"Characters: {total_chars:,}")
404
+ print(f"Avg size: {total_chars // count:,} chars")
405
+ ```
406
+
407
+ ## Language Distribution
408
+
409
+ Based on sampling 200 documents across the dataset using `langdetect`:
410
+
411
+ | Language | ISO Code | Percentage |
412
+ |----------|----------|------------|
413
+ | English | en | ~97% |
414
+ | French | fr | ~1% |
415
+ | Dutch | nl | ~0.5% |
416
+ | Other European | various | ~1.5% |
417
+
418
+ ## Known Limitations
419
+
420
+ - **OCR Errors**: Despite cleaning, some OCR artifacts remain, especially in older or lower-quality scans
421
+ - **Historical Spelling**: Texts preserve original spelling and grammar, which may differ from modern conventions
422
+ - **Content Bias**: Download-based sorting skews toward popular topics (legal texts, classics, frequently referenced works)
423
+ - **No Metadata**: Author, title, publication year, and other bibliographic data are not included in the chunks
424
+ - **Language Imbalance**: Heavily English-dominant due to Internet Archive's collection composition
425
+ - **Chunk Boundaries**: While optimized for readability, some chunks may split mid-thought
426
+
427
+ ## Ethical Considerations
428
+
429
+ - All source materials are from Internet Archive's public domain collection
430
+ - Users should verify the public domain status in their jurisdiction before commercial use
431
+ - Historical texts may contain outdated or offensive viewpoints that do not reflect modern values
432
+ - Recommended for research and model training; review outputs before production deployment
433
+
434
+ ## Citation
435
+
436
+ If you use this dataset, please cite:
437
+
438
+ ```bibtex
439
+ @dataset{internet_archive_chunked_1899,
440
+ title={Internet Archive Historical Texts - Chunked (0001-1899)},
441
+ year={2025},
442
+ publisher={Internet Archive},
443
+ note={Processed and chunked from Internet Archive public domain texts dated 0001-1899, sorted by download count}
444
+ }
445
+ ```
446
+
447
+ Please also acknowledge the Internet Archive for the source materials:
448
+ ```bibtex
449
+ @misc{internetarchive,
450
+ title={Internet Archive},
451
+ howpublished={\url{https://archive.org}},
452
+ note={Accessed: 2025}
453
+ }
454
+ ```
455
+
456
+ ## Technical Details
457
+
458
+ ### Shard Creation
459
+ - **Row group size**: 1,024 chunks per group
460
+ - **Compression**: Zstandard level 3 (balance of speed and compression)
461
+ - **Target shard size**: ~250M characters per shard
462
+ - **Write batch size**: 10,000 rows
463
+
464
+ ### Performance Tips
465
+ - Enable Arrow memory mapping for zero-copy reads on supported filesystems
466
+ - Use `use_threads=True` in PyArrow scanners to leverage multi-core CPUs
467
+ - Stream batches with `to_reader()` instead of materializing entire dataset
468
+ - For sampling, use `pc.utf8_slice_codeunits()` to avoid loading full multi-megabyte chunks
469
+
470
+ ### Storage Recommendations
471
+ - **SSD/NVMe**: Recommended for training pipelines
472
+ - **Compression ratio**: ~2.7x (594GB uncompressed → 217GB compressed)
473
+ - **Random access**: Each shard is independently readable
474
+
475
+ ## Version History
476
+
477
+ - **v1.0** (2025): Initial release with 2,445 shards, 163M chunks, 594B characters
478
+
479
+ ## License
480
+
481
+ This dataset contains materials from the Internet Archive's public domain collection. While the source materials are in the public domain, users should:
482
+ - Verify the legal status of specific works in their jurisdiction
483
+ - Comply with Internet Archive's [Terms of Use](https://archive.org/about/terms.php)
484
+ - Review individual works for any usage restrictions
485
+
486
+ The preprocessing scripts and this dataset compilation are provided as-is for research and educational purposes.
487
+
488
+ ## Suitability for Historical Language Modeling
489
+
490
+ ### Would this dataset create an LLM representative of a person from 1899?
491
+
492
+ **Short answer: Partially, with significant caveats.**
493
+
494
+ **Strengths:**
495
+ - ✅ **Authentic historical vocabulary and phrasing** - The texts use period-appropriate language, spelling conventions, and sentence structures
496
+ - ✅ **Diverse subject matter** - Includes legal documents, literature, religious texts, biographical materials, scientific works, poetry, and commercial records
497
+ - ✅ **Representative of educated/literate discourse** - Reflects how educated people wrote in the 19th century and earlier
498
+ - ✅ **Rich contextual knowledge** - Contains historical events, social norms, and cultural references from the period
499
+
500
+ **Limitations:**
501
+ - ❌ **Not conversational/spoken language** - These are published works, not everyday speech or personal correspondence
502
+ - ❌ **Heavy OCR artifacts** - Despite cleaning, remnants like "wid%" (widow), formatting errors, and garbled text persist
503
+ - ❌ **Bias toward formal/academic writing** - Overrepresents legal texts, religious works, and scholarly materials
504
+ - ❌ **Limited personal voice** - Lacks diaries, letters, informal notes that would reflect casual 1899 communication
505
+ - ❌ **Skewed by download popularity** - Popular classics and reference works are overrepresented
506
+ - ❌ **Temporal mixing** - Contains texts from across 1,900 years (0001-1899), not just the 1890s
507
+
508
+ **Text Quality Assessment:**
509
+
510
+ From sampled chunks, the dataset contains:
511
+ 1. **Legal/Administrative** (30-40%) - Court cases, legislation, property records, business directories
512
+ 2. **Literary** (20-30%) - Poetry (Shakespeare, Spenser), novels, historical narratives
513
+ 3. **Religious/Theological** (15-20%) - Sermons, biblical commentary, church records
514
+ 4. **Historical/Biographical** (10-15%) - Historical accounts, biographical sketches, chronicles
515
+ 5. **Technical/Reference** (10-15%) - Specifications, mathematical tables, encyclopedic entries
516
+ 6. **Marriage/Death Records** (5-10%) - Lists of names and vital statistics
517
+
518
+ **OCR Quality Issues Observed:**
519
+ - Formatting artifacts: "wid%" for widow, "wull" for will, "tke" for the
520
+ - Table data corruption (numbers in columns)
521
+ - Character substitution: "honour" (correct historical spelling vs. OCR error - hard to distinguish)
522
+ - Spacing issues and paragraph breaks
523
+
524
+ **Recommendation for Creating a "1899 Person" LLM:**
525
+
526
+ This dataset would be **most effective** when:
527
+ 1. **Combined with other sources**:
528
+ - Personal letters and diaries from 1890s
529
+ - Newspaper articles (more conversational)
530
+ - Period fiction dialogue
531
+ - Oral history transcriptions
532
+
533
+ 2. **Used with heavy post-processing**:
534
+ - Additional OCR error correction
535
+ - Filtering to focus on 1880s-1899 materials only
536
+ - Weighting toward more conversational genres
537
+ - Removing heavily corrupted chunks
538
+
539
+ 3. **Contextualized as formal written English**:
540
+ - Best for modeling formal 19th-century writing style
541
+ - Good for historical knowledge and cultural references
542
+ - Not ideal for casual conversation simulation
543
+
544
+ **Final Assessment:** This dataset provides excellent **historical language patterns and knowledge** but would produce an LLM that writes like a 19th-century *author or scholar*, not necessarily how an average person from 1899 would *speak*. For that, you'd need substantial supplementary data from informal sources.
545
+
546
+ The dataset's value lies in teaching historical vocabulary, grammatical structures, cultural context, and the formal register of 19th-century English - making it a strong foundation that requires augmentation for truly representative historical persona modeling.
547
+
548
+ ## Contact & Contributions
549
+
550
+ For issues, suggestions, or questions about this dataset:
551
+ - Check the Internet Archive for source material questions
552
+ - Report data quality issues through the dataset repository
553
+
554
+ ## Acknowledgments
555
+
556
+ - **Internet Archive** for preserving and providing access to historical texts
557
+ - **PyArrow** team for high-performance data processing tools
558
+ - The open-source community for OCR and text processing tools
shard_00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:420706d081776e377b031ecb32898a3bd7fbd7ce452dfb47ee9856b204e174d6
3
+ size 98841388
shard_00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00f47aeed5a8ad2d829796477d561420fa7b1dc99e320fd0b50899f0adcc942d
3
+ size 97280226
shard_00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4c4fb0c66a2c7e1dfe56cb81c2c3663f5c0f87bde3c5f6948deb807456e7d95
3
+ size 98255436
shard_00003.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6041dacf2d4531ce3e23603120d5ce0b501a66740d4abfcd79553f5a7cebc0b4
3
+ size 96572058
shard_00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:973901f42038eefcbcde5cacfbe29a54e4fd77751c6a9252083519ccb072eb75
3
+ size 97247680
shard_00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a237dfbd6b34eca178ecb2a4506226d2129e4afc05403c1297fc0575a95ff63
3
+ size 98881230
shard_00006.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3509d880d42bc96779036686bd6c8c7eb1b1ed8e3a5f892b320369c032413b58
3
+ size 97937430
shard_00007.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f236078afbfc969a89d88af718e54cbd6b7c160882cd42cbc0e41bcaa33180f3
3
+ size 97513988
shard_00008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:41dce2be2dfeb3dbb99ae7d6c4a6463e5af4e63e2ccf98b0a3222ed7d99a9af5
3
+ size 95669579
shard_00009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f68a547259d7d6d904cd16bf0f2118b9f44a85f18819cb7849bb3bfbf7df392a
3
+ size 95564666
shard_00010.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5abeefec7292f9fc586d3ee2ffbc66ebd9392a24e30d6663a84ccc59dc1c0e9b
3
+ size 100113953
shard_00011.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0eb9431bfba74a2ee4a74309367201b1511e79651c9dc0929c5bdff06e7ecf9c
3
+ size 96918971
shard_00012.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9607bbad630c6407b72152c8c2957c275a7f7d53b810662b402be3f5b3e8a251
3
+ size 96309322
shard_00013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:393af8e3f3533fd98c22c9796ff8a00f5c8c678a2f62f885e6045f668e3df1d6
3
+ size 98447032
shard_00014.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31bd0f648cfd57fbf33c35ca39343494addf80c970cf911d7b3f727d1ce08136
3
+ size 98530267
shard_00015.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23026eb1fc584f82e0ebb05b9e8c00e0d47f8fb061d6cc47f453d41f77a3c057
3
+ size 96811115
shard_00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:45d39df001fe951ea74d12aae76e47c37017c296b75ebf2d02d2040e92e824f7
3
+ size 100948566
shard_00017.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95df530a668c5546f2f51d06348181a2d993f67dd62e086f940e4d87d6cdc7c6
3
+ size 98877096
shard_00019.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:081c43e10e2e5696d75f23db46055f5d35f5c6aec8c440fb5ef828e01ac91895
3
+ size 97453504
shard_00020.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3df91ddbbbb881e6c950e7abc2f8891a3b61c80dff4ec17747a01131b8338f31
3
+ size 100094257
shard_00021.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6413c183fec6211d292fc1a06edb05d721b2c485b845f233179b68ce83d94750
3
+ size 100937780
shard_00022.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:660fb41f15f093d44ba99e5f634b59742e9084b50ac0366066233a3790718380
3
+ size 97572185
shard_00024.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d618ca52c66614d56317ec59e6f664579170c4c00b09375c9b20792883a416fe
3
+ size 97440940
shard_00025.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ffb5b58bda93b12a514cefc6441304bad9b2b02a8a393a02d0f8312f44aa4f29
3
+ size 95640003
shard_00026.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e536d1e04490350988801792f924ad65550d00f84880e520024b76c8d2444bd2
3
+ size 98578756
shard_00027.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8129ab15441a502bd9cc6f0a25f6d4f9eee2f48baaa21476046b62e3f07e95e
3
+ size 100137892
shard_00028.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56501d489d23765a6eaf8e698c4e7f9f9565d2a6e1454a70501e7e5283531c4e
3
+ size 97867154
shard_00029.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:388f80fcc71a35d132798a0815a8e5c0131f817a5323e587d207a740608ef6cf
3
+ size 97751460
shard_00030.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51ee79255141a60766efb6913169aa408ce8a0430856741f42d737a92496d942
3
+ size 99223345
shard_00031.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:326a380f110a208d74af3c9e94882098d75b9821339ca19f843a4d47aad6bb0f
3
+ size 98366892
shard_00032.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92d9b9fcd2507d3a2518643ab9d4392755d6d3bf75e1af4d3c86477f84aa02f2
3
+ size 98805180
shard_00034.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec9efaec352a4959cf7f4f825b66fdafc10cc3f39f49e43e7fb83f147cf3b418
3
+ size 98625922
shard_00035.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:185410db2017e0c5176939741383918057e8dc919787a3e55cb9cd10f53f52ce
3
+ size 98013508
shard_00036.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:609e204db6a24d156285898856d6c1f61a2bdccab718425b922bcd0d209326c5
3
+ size 98147983
shard_00042.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bdfc3f373aea657affea9cd54bbc92f8c268d6127c7129315f3ef5fa93893a09
3
+ size 101476457
shard_00043.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d3f0fec4244e3f31ced8fde20855dfbda6d8adc1e56561b5672ab43d70ac8178
3
+ size 99243228
shard_00044.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:47f46b30180575135df2babe5ca6d8469da0a1d23df93cdda0e4873fcbc9dcd4
3
+ size 99836760
shard_00046.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e845541e85d8a8a2ccda997810ff9036c76aa6835bb04f73a32e0085d80a9de
3
+ size 99398243
shard_00050.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c427b45a7bf65055e989f2a70b47bb970c2cd20df889a5613017401e4c82a77
3
+ size 105238413
shard_00059.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3151011ed77ab0124289ea5f01ac53a48026a6500ef3037b4eca4ec96bbe84f
3
+ size 100250936
shard_00063.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d46c45fc58d9607137fa3e69662ff6996d7638b85aed53462fa4ad21f5b574e4
3
+ size 100076767
shard_00069.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad9e35b0af91d9b4c0d22391e703b4d752dd7873fe87834e6cd2f1ddfb4a1014
3
+ size 101256284
shard_00071.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a28e4ce103f6dd4827d5fc095a59585c7ac69fc53c6efb9c3d3328855a80be7
3
+ size 100622264
shard_00074.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a637a9168cc96d5af3b20bd37218604972c2beefd4283cb4d3f2437966cce63d
3
+ size 100697472
shard_00075.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:527c2121921117da0ea811534f1980b2be464d8672537b645961df62b8a1a2a3
3
+ size 98917930
shard_00080.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4325d0f3a4a2cd4edbbb4d71ab122cd6f69726ddb5c5d4bea713793ebefb8e30
3
+ size 100637659
shard_00084.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9863b9f7ee504d7de2dd624e7dda1821d663c870aaf767cf2ce05e14ad7ac55
3
+ size 97857310
shard_00626.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6695702698f370324b76ccbe523c2cf1025c3a31ec218a77e450dd625b5137d
3
+ size 98667027