Datasets:
File size: 7,328 Bytes
c446aca b1d5920 c446aca b1d5920 a523cf7 b1d5920 a523cf7 b1d5920 a523cf7 b1d5920 ba23b9e b1d5920 a523cf7 b1d5920 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | ---
license: apache-2.0
language:
- en
- fr
- es
- it
- ru
- nl
tags:
- books
- glam
- digital-humanities
pretty_name: 19th Century Digitised Books Collection Metadata
size_categories:
- 10K<n<100K
---
# 19th Century Digitised Books Collection: BLBooks Metadata
## Dataset Summary
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.
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).
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 and the author. 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`.
## Languages and Periods
Records have been filtered to include only books tagged as written entirely in one of following languages: English, French, Spanish, Italian, Dutch, Russian.
| Language | Number of records |
| :------- | :---------------- |
| English | 36924 |
| French | 3734 |
| Spanish | 742 |
| Italian | 643 |
| Russian | 564 |
| Dutch | 535 |
Records per period (respecting original period split in *blbooks_derived*):
| Period | Number of records |
| :-------- | :---------------- |
| 1510_1699 | 680 |
| 1700_1799 | 1782 |
| 1800_1809 | 1062 |
| 1810_1819 | 1870 |
| 1820_1829 | 1847 |
| 1830_1839 | 1873 |
| 1840_1849 | 2815 |
| 1850_1859 | 3923 |
| 1860_1869 | 4439 |
| 1870_1879 | 5502 |
| 1880_1889 | 7248 |
| 1890_1899 | 10101 |
The resulting metadata file consists of 43,142 entries.
## Structure
The dataset is provided as a tabular file with the following columns:
| Column | Description |
| :--- | :--- |
| `record_id` | The unique identifier (from *blbooks_derived*, field `record_id`). |
| `date` | The publication year of this specific edition (from *blbooks_derived*, field `date`). |
| `title` | The full title of the work (from *blbooks_derived*, field `title`). |
| `place` | The place of publication (from *blbooks_derived*, field `place`). |
| `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`). |
| `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`). |
| `author` | Main author of the publication (from *blbooks_derived*, field `Name`). |
| `all_authors` | All names associated with the publication (from *blbooks_derived*, field `all names`). |
| `publisher` | Publisher of the work (from *blbooks_derived*, field `Publisher`). |
| `main_publication_country` | First country associated with publication (from *blbooks_derived*, field `Country of publication 1`). |
| `all_publication_countries` | A list of all associated countries of publication (from *blbooks_derived*, field `all Countries of publication`). |
| `main_language` | The primary language associated with the book (from *blbooks_derived*, field `Language_1`). |
| `number_of_pages` | Total page count. |
| `number_of_words` | Total word count (using `.split()`). |
| `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). |
| `book_id` | Unique identifier for the work after deduplication. |
| `best_version` | Boolean: `1` if this is the highest quality OCR version, `0` otherwise. |
| `genre` | Genre classification (`fiction` or `non-fiction`) assigned by Gemma 4. |
### Data instance
An example data instance:
```json
{
'record_id': 3112351,
'date': 1692,
'title': 'The Traytor, a tragedy [in five acts and in verse] with alterations, amendments and additions. Written by Mr. Rivers',
'place': 'London',
'mean_wc_ocr': 0.4944406779661017,
'std_wc_ocr': 0.1780338983050847,
'author': nan,
'all_authors': 'Shirley, James, 1596-1666 [person]',
'publisher': nan,
'main_publication_country': 'England',
'all_publication_countries': 'England',
'main_language': 'English',
'number_of_pages': 59,
'number_of_words': 18462,
'path_to_json': '1510_1699/1692_003112351.jsonl.gz',
'book_id': 37591,
'best_version': 1,
'genre': 'fiction'
}
```
### Duplicates and best version
An example of deduplication with best version selection:
```python
import pandas as pd
df = pd.read_csv("metadata_blbooks.csv")
df[df["author"] == "Austen, Jane"][["title", "author", "date", "mean_wc_ocr", "book_id", "best_version", "genre"]]
```
| record_id | title | author | date | mean_wc_ocr | book_id | best_version | genre |
|-----------|------------------------------------|--------------|------|-------------|---------|--------------|---------|
| 144506 | Emma : a novel | Austen, Jane | 1870 | 0.830995 | 1195 | 1 | fiction |
| 144565 | Mansfield Park : a novel | Austen, Jane | 1875 | 0.706090 | 1192 | 0 | fiction |
| 144563 | Mansfield Park : a novel | Austen, Jane | 1870 | 0.850376 | 1192 | 1 | fiction |
| 144766 | Sense and sensibility | Austen, Jane | 1884 | 0.569446 | 1193 | 0 | fiction |
| 144597 | Northanger Abbey : and, Persuasion | Austen, Jane | 1897 | 0.810952 | 1197 | 1 | fiction |
| 144469 | The novels of Jane Austen | Austen, Jane | 1898 | 0.861404 | 1196 | 1 | fiction |
| 144559 | Mansfield Park, etc | Austen, Jane | 1898 | 0.788097 | 1192 | 0 | fiction |
| 144749 | Sense and sensibility | Austen, Jane | 1896 | 0.816648 | 1193 | 1 | fiction |
| 144509 | Emma | Austen, Jane | 1896 | 0.772656 | 1195 | 0 | fiction |
| 144558 | Mansfield Park | Austen, Jane | 1897 | 0.830825 | 1192 | 0 | fiction |
| 144653 | Pride and prejudice | Austen, Jane | 1895 | 0.823202 | 1194 | 1 | fiction |
## Additional information
For additional information on the original dataset, read the dataset card at https://huggingface.co/datasets/TheBritishLibrary/blbooks. |