Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,127 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- fr
|
| 6 |
+
- es
|
| 7 |
+
- it
|
| 8 |
+
- ru
|
| 9 |
+
- nl
|
| 10 |
+
tags:
|
| 11 |
+
- books
|
| 12 |
+
- glam
|
| 13 |
+
- digital-humanities
|
| 14 |
+
pretty_name: 19th Century Digitised Books Collection Metadata
|
| 15 |
+
size_categories:
|
| 16 |
+
- 10K<n<100K
|
| 17 |
---
|
| 18 |
+
|
| 19 |
+
# 19th Century Digitised Books Collection: BLBooks Metadata
|
| 20 |
+
|
| 21 |
+
## Dataset Summary
|
| 22 |
+
This dataset consists of structured metadata from the British Library [19th Century Digitised Books Collection](https://bl.iro.bl.uk/collections/b7fd2482-debd-4495-9494-72aa2ead00bb) (henceforth **blbooks**), a large collection of digitized books in the public domain.
|
| 23 |
+
It has been created from the [OCR derived text + metadata version](https://doi.org/10.23636/r7w6-zy15) (henceforth **blbooks_derived**) of the [original dataset](https://bl.iro.bl.uk/collections/b7fd2482-debd-4495-9494-72aa2ead00bb), which is released under CC0 1.0 Universal Public Domain license. The complete implementation code is available at: [https://github.com/Text-Machine/data-processing-code](https://github.com/Text-Machine/data-processing-code).
|
| 24 |
+
We have processed the records to include a genre label (`fiction` or `non-fiction`) assigned by [Gemma4-31b-it](https://huggingface.co/google/gemma-4-31B-it) based on the title. We also used the [`dedupe`](https://dedupe.io/) library to perform fuzzy string matching for duplicate detection. All duplicated records are grouped under the same `book_id`, and the one with the highest OCR quality is flagged as `best_version`.
|
| 25 |
+
|
| 26 |
+
## Languages and Periods
|
| 27 |
+
Records have been filtered to include only books tagged as written entirely in one of following languages: English, French, Spanish, Italian, Dutch, Russian.
|
| 28 |
+
| Language | Number of books |
|
| 29 |
+
| :------- | :---------------- |
|
| 30 |
+
| English | 36924 |
|
| 31 |
+
| French | 3734 |
|
| 32 |
+
| Spanish | 742 |
|
| 33 |
+
| Italian | 643 |
|
| 34 |
+
| Russian | 564 |
|
| 35 |
+
| Dutch | 535 |
|
| 36 |
+
|
| 37 |
+
The resulting metadata file consists of 43,142 entries.
|
| 38 |
+
|
| 39 |
+
Books per period (respecting original period split in *blbooks_derived*):
|
| 40 |
+
| Period | Number of books |
|
| 41 |
+
| :-------- | :---------------- |
|
| 42 |
+
| 1510_1699 | 680 |
|
| 43 |
+
| 1700_1799 | 1782 |
|
| 44 |
+
| 1800_1809 | 1062 |
|
| 45 |
+
| 1810_1819 | 1870 |
|
| 46 |
+
| 1820_1829 | 1847 |
|
| 47 |
+
| 1830_1839 | 1873 |
|
| 48 |
+
| 1840_1849 | 2815 |
|
| 49 |
+
| 1850_1859 | 3923 |
|
| 50 |
+
| 1860_1869 | 4439 |
|
| 51 |
+
| 1870_1879 | 5502 |
|
| 52 |
+
| 1880_1889 | 7248 |
|
| 53 |
+
| 1890_1899 | 10101 |
|
| 54 |
+
|
| 55 |
+
## Structure
|
| 56 |
+
The dataset is provided as a tabular file with the following columns:
|
| 57 |
+
| Column | Description |
|
| 58 |
+
| :--- | :--- |
|
| 59 |
+
| `record_id` | The unique identifier (from *blbooks_derived*, field `record_id`). |
|
| 60 |
+
| `date` | The publication year of this specific edition (from *blbooks_derived*, field `date`). |
|
| 61 |
+
| `title` | The full title of the work (from *blbooks_derived*, field `title`). |
|
| 62 |
+
| `place` | The place of publication (from *blbooks_derived*, field `place`). |
|
| 63 |
+
| `mean_wc_ocr` | Word OCR quality averaged per record (from *blbooks_derived*, obtained by averaging the per-page mean word confidence values, field `mean_wc_ocr`). |
|
| 64 |
+
| `std_wc_ocr` | Standard deviation of the word confidence values averaged per record (from *blbooks_derived*, obtained by averaging the per-page standard deviation values, field `std_wc_ocr`). |
|
| 65 |
+
| `author` | Main author of the publication (from *blbooks_derived*, field `name`). |
|
| 66 |
+
| `all_authors` | All names associated with the publication (from *blbooks_derived*, field `all names`). |
|
| 67 |
+
| `publisher` | Publisher of the work (from *blbooks_derived*, field `Publisher`). |
|
| 68 |
+
| `main_publication_country` | First country associated with publication (from *blbooks_derived*, field `Country of publication 1`). |
|
| 69 |
+
| `all_publication_countries` | A list of all associated countries of publication (from *blbooks_derived*, field `all Countries of publication`). |
|
| 70 |
+
| `main_language` | The primary language associated with the book (from *blbooks_derived*, field `Language_1`). |
|
| 71 |
+
| `number_of_pages` | Total page count. |
|
| 72 |
+
| `number_of_words` | Total word count (using `.split()`). |
|
| 73 |
+
| `path_to_json` | File path to the corresponding raw JSONL content (pointing to the corresponding content file in *blbooks_derived*, where each row corresponds with one page of the book). |
|
| 74 |
+
| `book_id` | Unique identifier for the work after deduplication. |
|
| 75 |
+
| `best_version` | Boolean: `1` if this is the highest quality OCR version, `0` otherwise. |
|
| 76 |
+
| `genre` | Genre classification (`fiction` or `non-fiction`) assigned by Gemma 4. |
|
| 77 |
+
|
| 78 |
+
### Data instance
|
| 79 |
+
An example data instance:
|
| 80 |
+
```json
|
| 81 |
+
{
|
| 82 |
+
'record_id': 3112351,
|
| 83 |
+
'date': 1692,
|
| 84 |
+
'title': 'The Traytor, a tragedy [in five acts and in verse] with alterations, amendments and additions. Written by Mr. Rivers',
|
| 85 |
+
'place': 'London',
|
| 86 |
+
'mean_wc_ocr': 0.4944406779661017,
|
| 87 |
+
'std_wc_ocr': 0.1780338983050847,
|
| 88 |
+
'author': nan,
|
| 89 |
+
'all_authors': 'Shirley, James, 1596-1666 [person]',
|
| 90 |
+
'publisher': nan,
|
| 91 |
+
'main_publication_country': 'England',
|
| 92 |
+
'all_publication_countries': 'England',
|
| 93 |
+
'main_language': 'English',
|
| 94 |
+
'number_of_pages': 59,
|
| 95 |
+
'number_of_words': 18462,
|
| 96 |
+
'path_to_json': '1510_1699/1692_003112351.jsonl.gz',
|
| 97 |
+
'book_id': 37591,
|
| 98 |
+
'best_version': 1,
|
| 99 |
+
'genre': 'fiction'
|
| 100 |
+
}
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
### Duplicates and best version
|
| 104 |
+
An example of deduplication with best version selection:
|
| 105 |
+
```python
|
| 106 |
+
import pandas as pd
|
| 107 |
+
df = pd.read_csv("metadata_blbooks.csv")
|
| 108 |
+
df[df["author"] == "Austen, Jane"][["title", "author", "date", "mean_wc_ocr", "book_id", "best_version", "genre"]]
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
Returns:
|
| 112 |
+
| record_id | title | author | date | mean_wc_ocr | book_id | best_version | genre |
|
| 113 |
+
|-----------|------------------------------------|--------------|------|-------------|---------|--------------|---------|
|
| 114 |
+
| 144506 | Emma : a novel | Austen, Jane | 1870 | 0.830995 | 1195 | 1 | fiction |
|
| 115 |
+
| 144565 | Mansfield Park : a novel | Austen, Jane | 1875 | 0.706090 | 1192 | 0 | fiction |
|
| 116 |
+
| 144563 | Mansfield Park : a novel | Austen, Jane | 1870 | 0.850376 | 1192 | 1 | fiction |
|
| 117 |
+
| 144766 | Sense and sensibility | Austen, Jane | 1884 | 0.569446 | 1193 | 0 | fiction |
|
| 118 |
+
| 144597 | Northanger Abbey : and, Persuasion | Austen, Jane | 1897 | 0.810952 | 1197 | 1 | fiction |
|
| 119 |
+
| 144469 | The novels of Jane Austen | Austen, Jane | 1898 | 0.861404 | 1196 | 1 | fiction |
|
| 120 |
+
| 144559 | Mansfield Park, etc | Austen, Jane | 1898 | 0.788097 | 1192 | 0 | fiction |
|
| 121 |
+
| 144749 | Sense and sensibility | Austen, Jane | 1896 | 0.816648 | 1193 | 1 | fiction |
|
| 122 |
+
| 144509 | Emma | Austen, Jane | 1896 | 0.772656 | 1195 | 0 | fiction |
|
| 123 |
+
| 144558 | Mansfield Park | Austen, Jane | 1897 | 0.830825 | 1192 | 0 | fiction |
|
| 124 |
+
| 144653 | Pride and prejudice | Austen, Jane | 1895 | 0.823202 | 1194 | 1 | fiction |
|
| 125 |
+
|
| 126 |
+
## Additional information
|
| 127 |
+
For additional information on the original dataset, read the dataset card at https://huggingface.co/datasets/TheBritishLibrary/blbooks.
|