davanstrien HF staff commited on
Commit
5cbd435
1 Parent(s): e82d026

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +348 -18
README.md CHANGED
@@ -104,23 +104,334 @@ Each example represents a single page of OCR'd text.
104
  A single example of the dataset is as follows:
105
 
106
  ```python
107
- {'file name': '00000045.xml',
 
 
108
  'language': 'fr',
109
- 'language_confidence': 0.9999999999910871,
 
110
  'ppn': '646426230',
111
- 'text': 'Fig. 156 Tirant les sorts au moyen de la divination de Wen-wang',
112
- 'wc': [0.6125000119,
113
- 0.4799999893,
114
- 0.7916666865,
115
- 0.8066666722,
116
- 0.7720000148,
117
- 0.5849999785,
118
- 0.7580000162,
119
- 0.9200000167,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  0.6449999809,
121
- 0.6060000062,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  0.6549999714,
123
- 0.6362500191]}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  ```
125
 
126
 
@@ -132,6 +443,11 @@ A single example of the dataset is as follows:
132
  - 'ppn': 'Pica production numbers' an internal ID used by the library. See [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2702544.svg)](https://doi.org/10.5281/zenodo.2702544) for more details.
133
  'language': language predicted by `langid.py` (see above for more details)
134
  -'language_confidence': confidence score given by `langid.py`
 
 
 
 
 
135
 
136
  [More Information Needed]
137
 
@@ -141,6 +457,8 @@ This dataset contains only a single split `train`.
141
 
142
  ## Dataset Creation
143
 
 
 
144
  ### Curation Rationale
145
 
146
  [More Information Needed]
@@ -149,9 +467,15 @@ This dataset contains only a single split `train`.
149
 
150
  #### Initial Data Collection and Normalization
151
 
152
- This dataset includes text content produced through running Optical Character Recognition across 153,942 digitized works held by the Berlin State Library.
 
 
 
 
 
 
 
153
 
154
- [More Information Needed]
155
 
156
  #### Who are the source language producers?
157
 
@@ -166,7 +490,13 @@ This dataset contains machine-produced annotations for:
166
  - the confidence scores the OCR engines used to produce the full-text materials.
167
  - the predicted languages and associated confidence scores produced by `langid.py`
168
 
169
- [More Information Needed]
 
 
 
 
 
 
170
 
171
  #### Who are the annotators?
172
 
@@ -174,7 +504,7 @@ This dataset contains machine-produced annotations for:
174
 
175
  ### Personal and Sensitive Information
176
 
177
- This dataset contains historical material, which may include names, addresses etc, but these are not likely to refer to living individuals.
178
 
179
  [More Information Needed]
180
 
@@ -198,7 +528,7 @@ As with any historical material, the views and attitudes expressed in some texts
198
 
199
  ### Dataset Curators
200
 
201
- Labusch, Kai; Zellhöfer, David
202
 
203
  ### Licensing Information
204
 
 
104
  A single example of the dataset is as follows:
105
 
106
  ```python
107
+ {'aut': 'Doré, Henri',
108
+ 'date': '1912',
109
+ 'file name': '00000218.xml',
110
  'language': 'fr',
111
+ 'language_confidence': 1.0,
112
+ 'place': 'Chang-hai',
113
  'ppn': '646426230',
114
+ 'publisher': 'Imprimerie de la Mission Catholique',
115
+ 'text': "— 338 — Cela fait, on enterre la statuette qu’on vient d’outrager, atten dant la réalisation sur la personne elle-même. C’est l’outrage en effigie. Un deuxième moyen, c’est de représenter l’Esprit Vengeur sous la figure d’un fier-à-bras, armé d’un sabre, ou d’une pique, et de lui confier tout le soin de sa vengeance. On multiplie les incantations et les offrandes en son honneur, pour le porter au paroxysme de la fureur, et inspirer à l’Esprit malin l’idée de l’exécution de ses désirs : en un mot, on fait tout pour faire passer en son cœur la rage de vengeance qui consume le sien propre. C’est une invention diabolique imaginée pour assouvir sa haine sur l’ennemi qu’on a en horreur. Ailleurs, ce n’est qu’une figurine en bois ou en papier, qui est lancée contre l’ennemi; elle se dissimule, ou prend des formes fantastiques pour acomplir son œuvre de vengeance. Qu’on se rappelle la panique qui régna dans la ville de Nan- king ifâ ffl, et ailleurs, l’année où de méchantes gens répandirent le bruit que des hommes de papier volaient en l’air et coupaient les tresses de cheveux des Chinois. Ce fut une véritable terreur, tous étaient affolés, et il y eut à cette occasion de vrais actes de sauvagerie. Voir historiettes sur les envoûtements : Wieger Folk-Lore, N os 50, 128, 157, 158, 159. Corollaire. Les Tao-niu jift fx ou femmes “ Tao-clie'’. A cette super stition peut se rapporter la pratique des magiciennes du Kiang- sou ■n: m, dans les environs de Chang-hai ± m, par exemple. Ces femmes portent constamment avec- elles une statue réputée merveilleuse : elle n’a que quatre ou cinq pouces de hauteur ordinairement. A force de prières, d’incantations, elles finissent par la rendre illuminée, vivante et parlante, ou plutôt piaillarde, car elle ne répond que par des petits cris aigus et répétés aux demandes qu’on lui adressé; elle paraît comme animée, sautille,",
116
+ 'title': 'Les pratiques superstitieuses',
117
+ 'wc': [1.0,
118
+ 0.7266666889,
119
+ 1.0,
120
+ 0.9950000048,
121
+ 0.7059999704,
122
+ 0.5799999833,
123
+ 0.7142857313,
124
+ 0.7250000238,
125
+ 0.9855555296,
126
+ 0.6880000234,
127
+ 0.7099999785,
128
+ 0.7054545283,
129
+ 1.0,
130
+ 0.8125,
131
+ 0.7950000167,
132
+ 0.5681818128,
133
+ 0.5500000119,
134
+ 0.7900000215,
135
+ 0.7662500143,
136
+ 0.8830000162,
137
+ 0.9359999895,
138
+ 0.7411110997,
139
+ 0.7950000167,
140
+ 0.7962499857,
141
+ 0.6949999928,
142
+ 0.8937500119,
143
+ 0.6299999952,
144
+ 0.8820000291,
145
+ 1.0,
146
+ 0.6781818271,
147
+ 0.7649999857,
148
+ 0.437142849,
149
+ 1.0,
150
+ 1.0,
151
+ 0.7416666746,
152
+ 0.6474999785,
153
+ 0.8166666627,
154
+ 0.6825000048,
155
+ 0.75,
156
+ 0.7033333182,
157
+ 0.7599999905,
158
+ 0.7639999986,
159
+ 0.7516666651,
160
+ 1.0,
161
+ 1.0,
162
+ 0.5466666818,
163
+ 0.7571428418,
164
+ 0.8450000286,
165
+ 1.0,
166
+ 0.9350000024,
167
+ 1.0,
168
+ 1.0,
169
+ 0.7099999785,
170
+ 0.7250000238,
171
+ 0.8588888645,
172
+ 0.8366666436,
173
+ 0.7966666818,
174
+ 1.0,
175
+ 0.9066666961,
176
+ 0.7288888693,
177
+ 1.0,
178
+ 0.8333333135,
179
+ 0.8787500262,
180
+ 0.6949999928,
181
+ 0.8849999905,
182
+ 0.5816666484,
183
+ 0.5899999738,
184
+ 0.7922222018,
185
+ 1.0,
186
+ 1.0,
187
+ 0.6657142639,
188
+ 0.8650000095,
189
+ 0.7674999833,
190
+ 0.6000000238,
191
+ 0.9737499952,
192
+ 0.8140000105,
193
+ 0.978333354,
194
+ 1.0,
195
+ 0.7799999714,
196
+ 0.6650000215,
197
+ 1.0,
198
+ 0.823333323,
199
+ 1.0,
200
+ 0.9599999785,
201
+ 0.6349999905,
202
+ 1.0,
203
+ 0.9599999785,
204
+ 0.6025000215,
205
+ 0.8525000215,
206
+ 0.4875000119,
207
+ 0.675999999,
208
+ 0.8833333254,
209
+ 0.6650000215,
210
+ 0.7566666603,
211
+ 0.6200000048,
212
+ 0.5049999952,
213
+ 0.4524999857,
214
+ 1.0,
215
+ 0.7711111307,
216
+ 0.6666666865,
217
+ 0.7128571272,
218
+ 1.0,
219
+ 0.8700000048,
220
+ 0.6728571653,
221
+ 1.0,
222
+ 0.6800000072,
223
+ 0.6499999762,
224
+ 0.8259999752,
225
+ 0.7662500143,
226
+ 0.6725000143,
227
+ 0.8362500072,
228
+ 1.0,
229
+ 0.6600000262,
230
+ 0.6299999952,
231
+ 0.6825000048,
232
+ 0.7220000029,
233
+ 1.0,
234
+ 1.0,
235
+ 0.6587499976,
236
+ 0.6822222471,
237
+ 1.0,
238
+ 0.8339999914,
239
  0.6449999809,
240
+ 0.7062500119,
241
+ 0.9150000215,
242
+ 0.8824999928,
243
+ 0.6700000167,
244
+ 0.7250000238,
245
+ 0.8285714388,
246
+ 0.5400000215,
247
+ 1.0,
248
+ 0.7966666818,
249
+ 0.7350000143,
250
+ 0.6188889146,
251
+ 0.6499999762,
252
+ 1.0,
253
+ 0.7459999919,
254
+ 0.5799999833,
255
+ 0.7480000257,
256
+ 1.0,
257
+ 0.9333333373,
258
+ 0.790833354,
259
+ 0.5550000072,
260
+ 0.6700000167,
261
+ 0.7766666412,
262
+ 0.8280000091,
263
+ 0.7250000238,
264
+ 0.8669999838,
265
+ 0.5899999738,
266
+ 1.0,
267
+ 0.7562500238,
268
+ 1.0,
269
+ 0.7799999714,
270
+ 0.8500000238,
271
+ 0.4819999933,
272
+ 0.9350000024,
273
+ 1.0,
274
+ 0.8399999738,
275
+ 0.7950000167,
276
+ 1.0,
277
+ 0.9474999905,
278
+ 0.453333348,
279
+ 0.6575000286,
280
+ 0.9399999976,
281
+ 0.6733333468,
282
+ 0.8042857051,
283
+ 0.7599999905,
284
+ 1.0,
285
+ 0.7355555296,
286
+ 0.6499999762,
287
+ 0.7118181586,
288
+ 1.0,
289
+ 0.621999979,
290
+ 0.7200000286,
291
+ 1.0,
292
+ 0.853333354,
293
+ 0.6650000215,
294
+ 0.75,
295
+ 0.7787500024,
296
+ 1.0,
297
+ 0.8840000033,
298
+ 1.0,
299
+ 0.851111114,
300
+ 1.0,
301
+ 0.9142857194,
302
+ 1.0,
303
+ 0.8899999857,
304
+ 1.0,
305
+ 0.9024999738,
306
+ 1.0,
307
+ 0.6166666746,
308
+ 0.7533333302,
309
+ 0.7766666412,
310
+ 0.6637499928,
311
+ 1.0,
312
+ 0.8471428752,
313
+ 0.7012500167,
314
+ 0.6600000262,
315
+ 0.8199999928,
316
+ 1.0,
317
+ 0.7766666412,
318
+ 0.3899999857,
319
+ 0.7960000038,
320
+ 0.8050000072,
321
+ 1.0,
322
+ 0.8000000119,
323
+ 0.7620000243,
324
+ 1.0,
325
+ 0.7163636088,
326
+ 0.5699999928,
327
+ 0.8849999905,
328
+ 0.6166666746,
329
+ 0.8799999952,
330
+ 0.9058333039,
331
+ 1.0,
332
+ 0.6866666675,
333
+ 0.7810000181,
334
+ 0.3400000036,
335
+ 0.2599999905,
336
+ 0.6333333254,
337
+ 0.6524999738,
338
+ 0.4875000119,
339
+ 0.7425000072,
340
+ 0.75,
341
+ 0.6863636374,
342
+ 1.0,
343
+ 0.8742856979,
344
+ 0.137500003,
345
+ 0.2099999934,
346
+ 0.4199999869,
347
+ 0.8216666579,
348
+ 1.0,
349
+ 0.7563636303,
350
+ 0.3000000119,
351
+ 0.8579999804,
352
+ 0.6679999828,
353
+ 0.7099999785,
354
+ 0.7875000238,
355
+ 0.9499999881,
356
+ 0.5799999833,
357
+ 0.9150000215,
358
+ 0.6600000262,
359
+ 0.8066666722,
360
+ 0.729090929,
361
+ 0.6999999881,
362
+ 0.7400000095,
363
+ 0.8066666722,
364
+ 0.2866666615,
365
+ 0.6700000167,
366
+ 0.9225000143,
367
+ 1.0,
368
+ 0.7599999905,
369
+ 0.75,
370
+ 0.6899999976,
371
+ 0.3600000143,
372
+ 0.224999994,
373
+ 0.5799999833,
374
+ 0.8874999881,
375
+ 1.0,
376
+ 0.8066666722,
377
+ 0.8985714316,
378
+ 0.8827272654,
379
+ 0.8460000157,
380
+ 0.8880000114,
381
+ 0.9533333182,
382
+ 0.7966666818,
383
+ 0.75,
384
+ 0.8941666484,
385
+ 1.0,
386
+ 0.8450000286,
387
+ 0.8666666746,
388
+ 0.9533333182,
389
+ 0.5883333087,
390
+ 0.5799999833,
391
  0.6549999714,
392
+ 0.8600000143,
393
+ 1.0,
394
+ 0.7585714459,
395
+ 0.7114285827,
396
+ 1.0,
397
+ 0.8519999981,
398
+ 0.7250000238,
399
+ 0.7437499762,
400
+ 0.6639999747,
401
+ 0.8939999938,
402
+ 0.8877778053,
403
+ 0.7300000191,
404
+ 1.0,
405
+ 0.8766666651,
406
+ 0.8019999862,
407
+ 0.8928571343,
408
+ 1.0,
409
+ 0.853333354,
410
+ 0.5049999952,
411
+ 0.5416666865,
412
+ 0.7963636518,
413
+ 0.5600000024,
414
+ 0.8774999976,
415
+ 0.6299999952,
416
+ 0.5749999881,
417
+ 0.8199999928,
418
+ 0.7766666412,
419
+ 1.0,
420
+ 0.9850000143,
421
+ 0.5674999952,
422
+ 0.6240000129,
423
+ 1.0,
424
+ 0.9485714436,
425
+ 1.0,
426
+ 0.8174999952,
427
+ 0.7919999957,
428
+ 0.6266666651,
429
+ 0.7887499928,
430
+ 0.7825000286,
431
+ 0.5366666913,
432
+ 0.65200001,
433
+ 0.832857132,
434
+ 0.7488889098]}
435
  ```
436
 
437
 
 
443
  - 'ppn': 'Pica production numbers' an internal ID used by the library. See [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2702544.svg)](https://doi.org/10.5281/zenodo.2702544) for more details.
444
  'language': language predicted by `langid.py` (see above for more details)
445
  -'language_confidence': confidence score given by `langid.py`
446
+ - publisher: publisher of the item in which the text appears
447
+ - place: place of publication of the item in which the text appears
448
+ - date: date of the item in which the text appears
449
+ - title: title of the item in which the text appears
450
+ - aut: author of the item in which the text appears
451
 
452
  [More Information Needed]
453
 
 
457
 
458
  ## Dataset Creation
459
 
460
+ The dataset is created from [OCR fulltexts of the Digital Collections of the Berlin State Library (DC-SBB)](https://doi.org/10.5281/zenodo.3257041) hosted on Zenodo.
461
+
462
  ### Curation Rationale
463
 
464
  [More Information Needed]
 
467
 
468
  #### Initial Data Collection and Normalization
469
 
470
+ The dataset is created from [OCR fulltexts of the Digital Collections of the Berlin State Library (DC-SBB)](https://doi.org/10.5281/zenodo.3257041) hosted on Zenodo. This dataset includes text content produced through running Optical Character Recognition across 153,942 digitized works held by the Berlin State Library.
471
+
472
+ The [dataprep.ipynb](https://huggingface.co/datasets/biglam/berlin_state_library_ocr/blob/main/dataprep.ipynb) was used to create this dataset.
473
+
474
+ To make the dataset more useful for training language models, the following steps were carried out:
475
+ - the CSV `xml2csv_alto.csv`, which contains the full text corpus per document page (incl.OCR word confidences) was loaded using the `datasets` library
476
+ - this CSV was augmented with language information from `corpus-language.pkl` **note** some examples don't find a match for this. Sometimes this is because a text is blank, but some actual text may be missing predicted language information
477
+ - the CSV was further augmented by trying to map the PPN to fields in a metadata download created using [https://github.com/elektrobohemian/StabiHacks/blob/master/oai-analyzer/oai-analyzer.py](https://github.com/elektrobohemian/StabiHacks/blob/master/oai-analyzer/oai-analyzer.py). **note** not all examples are successfully matched to this metadata download.
478
 
 
479
 
480
  #### Who are the source language producers?
481
 
 
490
  - the confidence scores the OCR engines used to produce the full-text materials.
491
  - the predicted languages and associated confidence scores produced by `langid.py`
492
 
493
+ The dataset also contains metadata for the following fields:
494
+
495
+ - author
496
+ - publisher
497
+ - the place of publication
498
+ - title
499
+
500
 
501
  #### Who are the annotators?
502
 
 
504
 
505
  ### Personal and Sensitive Information
506
 
507
+ This dataset contains historical material, potentially including names, addresses etc., but these are not likely to refer to living individuals.
508
 
509
  [More Information Needed]
510
 
 
528
 
529
  ### Dataset Curators
530
 
531
+ Initial data created by: Labusch, Kai; Zellhöfer, David
532
 
533
  ### Licensing Information
534