xlr8harder commited on
Commit
a068f69
·
verified ·
1 Parent(s): 821fe98

Upload Talkie YaRN 32k Gutenberg pre-1931 dataset

Browse files
.gitattributes CHANGED
@@ -58,3 +58,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ train.jsonl filter=lfs diff=lfs merge=lfs -text
62
+ validation.jsonl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: other
5
+ task_categories:
6
+ - text-generation
7
+ pretty_name: Talkie YaRN 32k Gutenberg Pre-1931 265M
8
+ size_categories:
9
+ - 1K<n<10K
10
+ tags:
11
+ - talkie
12
+ - project-gutenberg
13
+ - pre-1931
14
+ - long-context
15
+ - yarn
16
+ configs:
17
+ - config_name: default
18
+ data_files:
19
+ - split: train
20
+ path: train.jsonl
21
+ - split: validation
22
+ path: validation.jsonl
23
+ ---
24
+
25
+ # Talkie YaRN 32k Gutenberg Pre-1931 265M
26
+
27
+ This dataset is the continued-pretraining corpus used for the Talkie YaRN 32k
28
+ context-extension experiments, including the recommended checkpoint
29
+ [`xlr8harder/talkie-1930-13b-yarn-32k-tf`](https://huggingface.co/xlr8harder/talkie-1930-13b-yarn-32k-tf).
30
+
31
+ It was generated from `common-pile/project_gutenberg_filtered`, joined with a
32
+ local Gutenberg publication-year metadata table, then filtered to English
33
+ public-domain books with publication years from 1500 through 1930. Project
34
+ Gutenberg boilerplate markers were stripped and each book was capped at 500,000
35
+ characters.
36
+
37
+ ## Splits
38
+
39
+ | Split | Rows | Talkie tokens | Notes |
40
+ | --- | ---: | ---: | --- |
41
+ | train | 3,146 | 265,080,702 | Used for continued pretraining |
42
+ | validation | 65 | 5,074,819 | Held-out continuation after the train manifest |
43
+
44
+ The train JSONL was reconstructed from the surviving manifest after the original
45
+ local file was lost. The reconstruction preserved the original Gutenberg ID
46
+ order and per-book metadata from `train.summary.json`.
47
+
48
+ ## Files
49
+
50
+ - `train.jsonl`: training split, one book per line.
51
+ - `validation.jsonl`: validation split, one book per line.
52
+ - `train.summary.json`: train manifest with per-book metadata and Talkie token counts.
53
+ - `validation.summary.json`: validation manifest with per-book metadata and Talkie token counts.
54
+ - `scripts/prepare_gutenberg_with_years.py`: generation and reconstruction script.
55
+ - `metadata/gutenberg_publication_years.csv`: publication-year metadata used by the script.
56
+ - `logs/prepare_train.log`: reconstruction log for the train split.
57
+
58
+ Each JSONL row has this shape:
59
+
60
+ ```json
61
+ {"text": "...", "meta": {"gutenberg_id": "...", "publication_year": 1900, "...": "..."}}
62
+ ```
63
+
64
+ ## Generation Command
65
+
66
+ The train split was reconstructed with:
67
+
68
+ ```bash
69
+ python scripts/prepare_gutenberg_with_years.py \
70
+ --dataset common-pile/project_gutenberg_filtered \
71
+ --split train \
72
+ --metadata-csv metadata/gutenberg_publication_years.csv \
73
+ --out train.jsonl \
74
+ --summary-out train.summary.json \
75
+ --include-summary train.summary.json \
76
+ --reuse-include-summary-token-counts \
77
+ --min-year 1500 \
78
+ --max-year 1930 \
79
+ --languages en \
80
+ --rights-contains "public domain" \
81
+ --min-chars 100000 \
82
+ --max-chars-per-book 500000 \
83
+ --target-talkie-tokens 265000000 \
84
+ --max-books 0
85
+ ```
86
+
87
+ For a fresh build rather than manifest reconstruction, omit `--include-summary`
88
+ and `--reuse-include-summary-token-counts`, and write to a new output path.
89
+
90
+ The validation split used the same filters while excluding the train manifest:
91
+
92
+ ```bash
93
+ python scripts/prepare_gutenberg_with_years.py \
94
+ --dataset common-pile/project_gutenberg_filtered \
95
+ --split train \
96
+ --metadata-csv metadata/gutenberg_publication_years.csv \
97
+ --out validation.jsonl \
98
+ --summary-out validation.summary.json \
99
+ --exclude-summary train.summary.json \
100
+ --min-year 1500 \
101
+ --max-year 1930 \
102
+ --languages en \
103
+ --rights-contains "public domain" \
104
+ --min-chars 100000 \
105
+ --max-chars-per-book 500000 \
106
+ --target-talkie-tokens 5000000 \
107
+ --max-books 0
108
+ ```
109
+
110
+ ## Integrity
111
+
112
+ - `train.jsonl` SHA-256: `50a0908c33e741ce96e9b8c75f266369aac7f1ccd76757970904031b487c283c`
113
+ - `validation.jsonl` SHA-256: `efa8f3218ec219aeb5ffd5cbe70b92c3bb42e4b599dbb74f3dde7dc4b256d21a`
114
+
115
+ ## License Notes
116
+
117
+ The source rows selected here are marked `Public Domain` in
118
+ `common-pile/project_gutenberg_filtered`. This dataset card uses `other` because
119
+ the corpus is a generated selection from upstream sources plus a metadata join;
120
+ verify source rights and downstream requirements for your use case.
logs/prepare_train.log ADDED
The diff for this file is too large to render. See raw diff
 
metadata/gutenberg_publication_years.csv ADDED
The diff for this file is too large to render. See raw diff
 
scripts/prepare_gutenberg_with_years.py ADDED
@@ -0,0 +1,429 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import argparse
4
+ from collections import Counter
5
+ from dataclasses import asdict, dataclass
6
+ import csv
7
+ import json
8
+ from pathlib import Path
9
+ import re
10
+ import sys
11
+ from typing import Any
12
+
13
+
14
+ DEFAULT_DATASET = "common-pile/project_gutenberg_filtered"
15
+ YEAR_RE = re.compile(r"(?<!\d)(1[5-9]\d{2}|20\d{2})(?!\d)")
16
+ BOILERPLATE_PATTERNS = [
17
+ re.compile(r"\*\*\*\s*START OF (?:THE|THIS) PROJECT GUTENBERG EBOOK.*?\*\*\*", re.IGNORECASE | re.DOTALL),
18
+ re.compile(r"\*\*\*\s*END OF (?:THE|THIS) PROJECT GUTENBERG EBOOK.*", re.IGNORECASE | re.DOTALL),
19
+ ]
20
+
21
+
22
+ @dataclass
23
+ class BookSummary:
24
+ gutenberg_id: str
25
+ title: str
26
+ author: str
27
+ publication_year: int
28
+ metadata_title: str
29
+ metadata_author: str
30
+ language: str
31
+ rights: str
32
+ release_date: str
33
+ source_chars: int
34
+ chars: int
35
+ talkie_tokens: int | None
36
+
37
+
38
+ def parse_args() -> argparse.Namespace:
39
+ parser = argparse.ArgumentParser(
40
+ description=(
41
+ "Join a Hugging Face Gutenberg text dataset against a local metadata CSV "
42
+ "with publication years and emit local JSONL for Talkie context-extension training."
43
+ )
44
+ )
45
+ parser.add_argument("--dataset", default=DEFAULT_DATASET)
46
+ parser.add_argument("--config")
47
+ parser.add_argument("--split", default="train")
48
+ parser.add_argument("--metadata-csv", type=Path, required=True)
49
+ parser.add_argument("--out", type=Path, default=Path("data/gutenberg_pre1931.jsonl"))
50
+ parser.add_argument("--summary-out", type=Path, default=Path("data/gutenberg_pre1931.summary.json"))
51
+ parser.add_argument("--tokenizer-dir", type=Path)
52
+ parser.add_argument(
53
+ "--include-summary",
54
+ type=Path,
55
+ help=(
56
+ "Rebuild only the Gutenberg IDs listed in an existing summary, preserving "
57
+ "that summary's book order. Useful when the JSONL was lost but the manifest remains."
58
+ ),
59
+ )
60
+ parser.add_argument(
61
+ "--reuse-include-summary-token-counts",
62
+ action="store_true",
63
+ help=(
64
+ "When rebuilding from --include-summary without --tokenizer-dir, copy per-book "
65
+ "Talkie token counts from that summary instead of re-tokenizing."
66
+ ),
67
+ )
68
+ parser.add_argument("--id-column", default="id")
69
+ parser.add_argument("--year-column", default="publication_year")
70
+ parser.add_argument("--metadata-title-column", default="title")
71
+ parser.add_argument("--metadata-author-column", default="author")
72
+ parser.add_argument("--min-year", type=int, default=1500)
73
+ parser.add_argument("--max-year", type=int, default=1930)
74
+ parser.add_argument("--languages", nargs="+", default=["en"])
75
+ parser.add_argument("--rights-contains", default="public domain")
76
+ parser.add_argument("--min-chars", type=int, default=100_000)
77
+ parser.add_argument("--max-chars-per-book", type=int, default=0)
78
+ parser.add_argument("--max-books", type=int, default=64)
79
+ parser.add_argument("--target-talkie-tokens", type=int, default=2_000_000)
80
+ parser.add_argument(
81
+ "--append-existing",
82
+ action="store_true",
83
+ help=(
84
+ "Append additional books to --out using --summary-out to avoid duplicate "
85
+ "Gutenberg IDs. The target token count is interpreted as the desired "
86
+ "combined total."
87
+ ),
88
+ )
89
+ parser.add_argument(
90
+ "--exclude-summary",
91
+ type=Path,
92
+ action="append",
93
+ default=[],
94
+ help="Skip Gutenberg IDs listed in an existing summary JSON. May be supplied more than once.",
95
+ )
96
+ parser.add_argument("--strip-gutenberg-boilerplate", action=argparse.BooleanOptionalAction, default=True)
97
+ parser.add_argument("--trust-remote-code", action=argparse.BooleanOptionalAction, default=False)
98
+ return parser.parse_args()
99
+
100
+
101
+ def import_datasets():
102
+ try:
103
+ from datasets import load_dataset
104
+ except ImportError as error:
105
+ raise SystemExit(
106
+ "Missing dependency: install with `uv sync --extra data` or "
107
+ "`python -m pip install datasets pyarrow`."
108
+ ) from error
109
+ return load_dataset
110
+
111
+
112
+ def load_tokenizer(path: Path | None):
113
+ if path is None:
114
+ return None
115
+ try:
116
+ from transformers import AutoTokenizer
117
+ except ImportError as error:
118
+ raise SystemExit("Missing dependency: transformers is required for --tokenizer-dir.") from error
119
+ tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True)
120
+ tokenizer.model_max_length = sys.maxsize
121
+ return tokenizer
122
+
123
+
124
+ def scalar(value: Any) -> str:
125
+ if value is None:
126
+ return ""
127
+ return value if isinstance(value, str) else str(value)
128
+
129
+
130
+ def row_metadata(row: dict[str, Any]) -> dict[str, Any]:
131
+ metadata = row.get("metadata")
132
+ return metadata if isinstance(metadata, dict) else {}
133
+
134
+
135
+ def row_value(row: dict[str, Any], key: str, metadata_key: str | None = None) -> Any:
136
+ value = row.get(key)
137
+ if value not in (None, ""):
138
+ return value
139
+ return row_metadata(row).get(metadata_key or key)
140
+
141
+
142
+ def normalize_id(value: Any) -> str:
143
+ text = scalar(value).strip()
144
+ if text.upper().startswith("PG"):
145
+ text = text[2:]
146
+ return text
147
+
148
+
149
+ def parse_year(value: Any) -> int | None:
150
+ text = scalar(value)
151
+ match = YEAR_RE.search(text)
152
+ return int(match.group(1)) if match else None
153
+
154
+
155
+ def sniff_columns(fieldnames: list[str], requested: dict[str, str]) -> dict[str, str]:
156
+ lowered = {name.lower(): name for name in fieldnames}
157
+ aliases = {
158
+ "id": ["id", "gutenberg_id", "ebook_id", "book_id", "pg_id", "gutenbergid"],
159
+ "publication_year": ["publication_year", "year", "issued_date", "issued", "published", "publication_date"],
160
+ "title": ["title", "book_title"],
161
+ "author": ["author", "creator", "authors"],
162
+ }
163
+ result = {}
164
+ for key, requested_name in requested.items():
165
+ if requested_name in fieldnames:
166
+ result[key] = requested_name
167
+ continue
168
+ for alias in aliases[key]:
169
+ if alias in lowered:
170
+ result[key] = lowered[alias]
171
+ break
172
+ else:
173
+ raise ValueError(
174
+ f"could not find {key!r} column. Requested {requested_name!r}; "
175
+ f"available columns: {fieldnames}"
176
+ )
177
+ return result
178
+
179
+
180
+ def load_year_metadata(args: argparse.Namespace) -> tuple[dict[str, dict[str, Any]], dict[str, str]]:
181
+ with args.metadata_csv.open("r", encoding="utf-8-sig", errors="replace", newline="") as handle:
182
+ reader = csv.DictReader(handle)
183
+ if reader.fieldnames is None:
184
+ raise ValueError(f"metadata CSV has no header: {args.metadata_csv}")
185
+ columns = sniff_columns(
186
+ reader.fieldnames,
187
+ {
188
+ "id": args.id_column,
189
+ "publication_year": args.year_column,
190
+ "title": args.metadata_title_column,
191
+ "author": args.metadata_author_column,
192
+ },
193
+ )
194
+ metadata: dict[str, dict[str, Any]] = {}
195
+ for row in reader:
196
+ book_id = normalize_id(row.get(columns["id"]))
197
+ year = parse_year(row.get(columns["publication_year"]))
198
+ if not book_id or year is None:
199
+ continue
200
+ metadata[book_id] = {
201
+ "publication_year": year,
202
+ "title": scalar(row.get(columns["title"])),
203
+ "author": scalar(row.get(columns["author"])),
204
+ }
205
+ return metadata, columns
206
+
207
+
208
+ def load_include_manifest(path: Path | None) -> tuple[list[str], dict[str, dict[str, Any]]]:
209
+ if path is None:
210
+ return [], {}
211
+ summary = json.loads(path.read_text(encoding="utf-8"))
212
+ seen: set[str] = set()
213
+ include_order: list[str] = []
214
+ include_manifest: dict[str, dict[str, Any]] = {}
215
+ for item in summary.get("books", []):
216
+ book_id = normalize_id(item.get("gutenberg_id"))
217
+ if book_id and book_id not in seen:
218
+ seen.add(book_id)
219
+ include_order.append(book_id)
220
+ include_manifest[book_id] = item
221
+ if not include_order:
222
+ raise ValueError(f"--include-summary has no usable book IDs: {path}")
223
+ return include_order, include_manifest
224
+
225
+
226
+ def clean_text(text: str, strip_boilerplate: bool) -> str:
227
+ text = text.replace("\r\n", "\n").replace("\r", "\n")
228
+ if strip_boilerplate:
229
+ for pattern in BOILERPLATE_PATTERNS:
230
+ text = pattern.sub("\n", text)
231
+ return text.strip()
232
+
233
+
234
+ def row_ok(row: dict[str, Any], args: argparse.Namespace, metadata: dict[str, Any]) -> bool:
235
+ if row_value(row, "language") not in set(args.languages):
236
+ return False
237
+ rights = scalar(row_value(row, "rights", "license"))
238
+ if args.rights_contains and args.rights_contains.lower() not in rights.lower():
239
+ return False
240
+ year = metadata["publication_year"]
241
+ return args.min_year <= year <= args.max_year
242
+
243
+
244
+ def main() -> None:
245
+ args = parse_args()
246
+ load_dataset = import_datasets()
247
+ tokenizer = load_tokenizer(args.tokenizer_dir)
248
+ year_metadata, columns = load_year_metadata(args)
249
+ if not year_metadata:
250
+ raise ValueError(f"no usable rows found in metadata CSV: {args.metadata_csv}")
251
+ include_order, include_manifest = load_include_manifest(args.include_summary)
252
+ include_ids = set(include_order)
253
+ if include_order and args.append_existing:
254
+ raise ValueError("--include-summary cannot be combined with --append-existing")
255
+ if args.reuse_include_summary_token_counts and not include_order:
256
+ raise ValueError("--reuse-include-summary-token-counts requires --include-summary")
257
+
258
+ load_kwargs = {
259
+ "split": args.split,
260
+ "streaming": True,
261
+ "trust_remote_code": args.trust_remote_code,
262
+ }
263
+ if args.config:
264
+ dataset = load_dataset(args.dataset, args.config, **load_kwargs)
265
+ else:
266
+ dataset = load_dataset(args.dataset, **load_kwargs)
267
+ args.out.parent.mkdir(parents=True, exist_ok=True)
268
+ args.summary_out.parent.mkdir(parents=True, exist_ok=True)
269
+
270
+ counters: Counter[str] = Counter()
271
+ summaries: list[BookSummary] = []
272
+ included_lines: dict[str, str] = {}
273
+ included_summaries: dict[str, BookSummary] = {}
274
+ total_talkie_tokens = 0
275
+ existing_ids: set[str] = set()
276
+ existing_counts: dict[str, int] | None = None
277
+
278
+ for summary_path in args.exclude_summary:
279
+ excluded_summary = json.loads(summary_path.read_text(encoding="utf-8"))
280
+ existing_ids.update(
281
+ normalize_id(item.get("gutenberg_id"))
282
+ for item in excluded_summary.get("books", [])
283
+ if item.get("gutenberg_id") is not None
284
+ )
285
+
286
+ if args.append_existing:
287
+ if not args.out.exists():
288
+ raise FileNotFoundError(f"--append-existing requires existing --out: {args.out}")
289
+ if not args.summary_out.exists():
290
+ raise FileNotFoundError(
291
+ f"--append-existing requires existing --summary-out: {args.summary_out}"
292
+ )
293
+ existing_summary = json.loads(args.summary_out.read_text(encoding="utf-8"))
294
+ existing_counts = dict(existing_summary.get("counts") or {})
295
+ summaries = [BookSummary(**item) for item in existing_summary.get("books", [])]
296
+ existing_ids.update(item.gutenberg_id for item in summaries)
297
+ total_talkie_tokens = int(
298
+ existing_summary.get("total_talkie_tokens")
299
+ or sum(item.talkie_tokens or 0 for item in summaries)
300
+ )
301
+
302
+ output_mode = "a" if args.append_existing else "w"
303
+ with args.out.open(output_mode, encoding="utf-8") as out_handle:
304
+ for row in dataset:
305
+ counters["seen"] += 1
306
+ book_id = normalize_id(row.get("id"))
307
+ if include_ids and book_id not in include_ids:
308
+ counters["skip_not_in_include_summary"] += 1
309
+ continue
310
+ if include_ids and book_id in included_lines:
311
+ counters["skip_existing"] += 1
312
+ continue
313
+ if book_id in existing_ids:
314
+ counters["skip_existing"] += 1
315
+ continue
316
+ meta = year_metadata.get(book_id)
317
+ if meta is None:
318
+ counters["skip_missing_year_metadata"] += 1
319
+ continue
320
+ if not row_ok(row, args, meta):
321
+ counters["skip_filter"] += 1
322
+ continue
323
+ source_text = scalar(row.get("text"))
324
+ text = clean_text(source_text, args.strip_gutenberg_boilerplate)
325
+ if len(text) < args.min_chars:
326
+ counters["skip_short"] += 1
327
+ continue
328
+ if args.max_chars_per_book > 0:
329
+ text = text[: args.max_chars_per_book]
330
+
331
+ talkie_tokens = None
332
+ if tokenizer is not None:
333
+ talkie_tokens = len(tokenizer.encode(text, add_special_tokens=False))
334
+ total_talkie_tokens += talkie_tokens
335
+ elif args.reuse_include_summary_token_counts:
336
+ manifest_tokens = include_manifest[book_id].get("talkie_tokens")
337
+ if manifest_tokens is not None:
338
+ talkie_tokens = int(manifest_tokens)
339
+ total_talkie_tokens += talkie_tokens
340
+
341
+ summary = BookSummary(
342
+ gutenberg_id=book_id,
343
+ title=scalar(row_value(row, "title")),
344
+ author=scalar(row_value(row, "author")),
345
+ publication_year=int(meta["publication_year"]),
346
+ metadata_title=scalar(meta.get("title")),
347
+ metadata_author=scalar(meta.get("author")),
348
+ language=scalar(row_value(row, "language")),
349
+ rights=scalar(row_value(row, "rights", "license")),
350
+ release_date=scalar(row_value(row, "release_date", "added") or row.get("added")),
351
+ source_chars=len(source_text),
352
+ chars=len(text),
353
+ talkie_tokens=talkie_tokens,
354
+ )
355
+ line = json.dumps({"text": text, "meta": asdict(summary)}, ensure_ascii=False)
356
+ if include_ids:
357
+ included_lines[book_id] = line
358
+ included_summaries[book_id] = summary
359
+ else:
360
+ summaries.append(summary)
361
+ out_handle.write(line + "\n")
362
+ counters["written"] += 1
363
+ print(
364
+ json.dumps(
365
+ {
366
+ "written": counters["written"],
367
+ "seen": counters["seen"],
368
+ "id": book_id,
369
+ "publication_year": summary.publication_year,
370
+ "talkie_tokens": talkie_tokens,
371
+ "title": summary.title[:120],
372
+ },
373
+ ensure_ascii=False,
374
+ sort_keys=True,
375
+ ),
376
+ flush=True,
377
+ )
378
+
379
+ if include_ids and len(included_lines) == len(include_order):
380
+ break
381
+ if args.max_books and counters["written"] >= args.max_books:
382
+ break
383
+ if not include_ids:
384
+ if args.target_talkie_tokens and total_talkie_tokens >= args.target_talkie_tokens:
385
+ break
386
+
387
+ if include_ids:
388
+ missing = [book_id for book_id in include_order if book_id not in included_lines]
389
+ if missing:
390
+ preview = ", ".join(missing[:20])
391
+ raise RuntimeError(
392
+ f"missing {len(missing)} IDs from --include-summary while rebuilding {args.out}: "
393
+ f"{preview}"
394
+ )
395
+ summaries = [included_summaries[book_id] for book_id in include_order]
396
+ for book_id in include_order:
397
+ out_handle.write(included_lines[book_id] + "\n")
398
+
399
+ summary_obj = {
400
+ "dataset": args.dataset,
401
+ "config": args.config,
402
+ "split": args.split,
403
+ "metadata_csv": str(args.metadata_csv),
404
+ "metadata_columns": columns,
405
+ "filters": {
406
+ "languages": args.languages,
407
+ "min_year": args.min_year,
408
+ "max_year": args.max_year,
409
+ "rights_contains": args.rights_contains,
410
+ "min_chars": args.min_chars,
411
+ "strip_gutenberg_boilerplate": args.strip_gutenberg_boilerplate,
412
+ },
413
+ "counts": dict(counters),
414
+ "existing_counts": existing_counts,
415
+ "total_talkie_tokens": total_talkie_tokens
416
+ if tokenizer is not None or args.reuse_include_summary_token_counts
417
+ else None,
418
+ "books": [asdict(item) for item in summaries],
419
+ }
420
+ args.summary_out.write_text(
421
+ json.dumps(summary_obj, ensure_ascii=False, indent=2, sort_keys=True) + "\n",
422
+ encoding="utf-8",
423
+ )
424
+ print(f"wrote {args.out}", file=sys.stderr)
425
+ print(f"wrote {args.summary_out}", file=sys.stderr)
426
+
427
+
428
+ if __name__ == "__main__":
429
+ main()
train.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50a0908c33e741ce96e9b8c75f266369aac7f1ccd76757970904031b487c283c
3
+ size 1135646608
train.summary.json ADDED
The diff for this file is too large to render. See raw diff
 
validation.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:efa8f3218ec219aeb5ffd5cbe70b92c3bb42e4b599dbb74f3dde7dc4b256d21a
3
+ size 21884565
validation.summary.json ADDED
@@ -0,0 +1,944 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "books": [
3
+ {
4
+ "author": "",
5
+ "chars": 346580,
6
+ "gutenberg_id": "3187",
7
+ "language": "en",
8
+ "metadata_author": "Mark Twain",
9
+ "metadata_title": "Christian Science",
10
+ "publication_year": 1907,
11
+ "release_date": "2024-05-14T13:13:13.820316",
12
+ "rights": "Public Domain",
13
+ "source_chars": 346580,
14
+ "talkie_tokens": 80143,
15
+ "title": "Christian Science"
16
+ },
17
+ {
18
+ "author": "",
19
+ "chars": 199025,
20
+ "gutenberg_id": "31872",
21
+ "language": "en",
22
+ "metadata_author": "Browne",
23
+ "metadata_title": "The Christian Church in These Islands before the Coming of Augustine",
24
+ "publication_year": 1894,
25
+ "release_date": "2024-05-14T13:13:13.951701",
26
+ "rights": "Public Domain",
27
+ "source_chars": 199025,
28
+ "talkie_tokens": 46547,
29
+ "title": "The Christian Church in These Islands before the Coming of Augustine\nThree Lectures Delivered at St. Paul's in January 1894"
30
+ },
31
+ {
32
+ "author": "",
33
+ "chars": 345795,
34
+ "gutenberg_id": "31873",
35
+ "language": "en",
36
+ "metadata_author": "Novalis",
37
+ "metadata_title": "Henry of Ofterdingen: A Romance.",
38
+ "publication_year": 1842,
39
+ "release_date": "2024-05-14T13:13:13.974359",
40
+ "rights": "Public Domain",
41
+ "source_chars": 345795,
42
+ "talkie_tokens": 78169,
43
+ "title": "Henry of Ofterdingen: A Romance."
44
+ },
45
+ {
46
+ "author": "",
47
+ "chars": 500000,
48
+ "gutenberg_id": "31879",
49
+ "language": "en",
50
+ "metadata_author": "Hannah More",
51
+ "metadata_title": "Coelebs In Search of a Wife",
52
+ "publication_year": 1808,
53
+ "release_date": "2024-05-14T13:13:14.134644",
54
+ "rights": "Public Domain",
55
+ "source_chars": 786933,
56
+ "talkie_tokens": 113362,
57
+ "title": "Coelebs In Search of a Wife"
58
+ },
59
+ {
60
+ "author": "",
61
+ "chars": 201856,
62
+ "gutenberg_id": "31887",
63
+ "language": "en",
64
+ "metadata_author": "O. P. Cutter",
65
+ "metadata_title": "Our Battery; Or, The Journal of Company B, 1st O.V.A.",
66
+ "publication_year": 1864,
67
+ "release_date": "2024-05-14T13:13:14.898418",
68
+ "rights": "Public Domain",
69
+ "source_chars": 201856,
70
+ "talkie_tokens": 46852,
71
+ "title": "Our Battery; Or, The Journal of Company B, 1st O.V.A."
72
+ },
73
+ {
74
+ "author": "",
75
+ "chars": 500000,
76
+ "gutenberg_id": "31910",
77
+ "language": "en",
78
+ "metadata_author": "John Shipp",
79
+ "metadata_title": "Memoirs of the Extraordinary Military Career of John Shipp",
80
+ "publication_year": 1890,
81
+ "release_date": "2024-05-14T13:13:15.674002",
82
+ "rights": "Public Domain",
83
+ "source_chars": 736873,
84
+ "talkie_tokens": 117607,
85
+ "title": "Memoirs of the Extraordinary Military Career of John Shipp\nLate a Lieut. in His Majesty's 87th Regiment"
86
+ },
87
+ {
88
+ "author": "",
89
+ "chars": 381610,
90
+ "gutenberg_id": "31920",
91
+ "language": "en",
92
+ "metadata_author": "Sellars",
93
+ "metadata_title": "The Next Step in Religion: An Essay toward the Coming Renaissance",
94
+ "publication_year": 1918,
95
+ "release_date": "2024-05-14T13:13:16.013062",
96
+ "rights": "Public Domain",
97
+ "source_chars": 381610,
98
+ "talkie_tokens": 86077,
99
+ "title": "The Next Step in Religion: An Essay toward the Coming Renaissance"
100
+ },
101
+ {
102
+ "author": "",
103
+ "chars": 465188,
104
+ "gutenberg_id": "31930",
105
+ "language": "en",
106
+ "metadata_author": "Frank Mayer",
107
+ "metadata_title": "The Song of the Wolf",
108
+ "publication_year": 1910,
109
+ "release_date": "2024-05-14T13:13:16.292621",
110
+ "rights": "Public Domain",
111
+ "source_chars": 465188,
112
+ "talkie_tokens": 110914,
113
+ "title": "The Song of the Wolf"
114
+ },
115
+ {
116
+ "author": "",
117
+ "chars": 459225,
118
+ "gutenberg_id": "31933",
119
+ "language": "en",
120
+ "metadata_author": "Friedrich Engels",
121
+ "metadata_title": "Landmarks of Scientific Socialism: \"Anti-Duehring\"",
122
+ "publication_year": 1907,
123
+ "release_date": "2024-05-14T13:13:16.417780",
124
+ "rights": "Public Domain",
125
+ "source_chars": 459225,
126
+ "talkie_tokens": 98814,
127
+ "title": "Landmarks of Scientific Socialism: \"Anti-Duehring\""
128
+ },
129
+ {
130
+ "author": "",
131
+ "chars": 500000,
132
+ "gutenberg_id": "31938",
133
+ "language": "en",
134
+ "metadata_author": "",
135
+ "metadata_title": "Lives of the most Eminent Painters Sculptors and Architects, Vol. 08 (of 10)",
136
+ "publication_year": 1550,
137
+ "release_date": "2024-05-14T13:13:16.575828",
138
+ "rights": "Public Domain",
139
+ "source_chars": 574835,
140
+ "talkie_tokens": 120580,
141
+ "title": "Lives of the most Eminent Painters Sculptors and Architects, Vol. 08 (of 10)\r\nBastiano to Taddeo Zucchero"
142
+ },
143
+ {
144
+ "author": "",
145
+ "chars": 208847,
146
+ "gutenberg_id": "31940",
147
+ "language": "en",
148
+ "metadata_author": "Elisabeth Luther Cary",
149
+ "metadata_title": "Artists Past and Present; Random Studies",
150
+ "publication_year": 1909,
151
+ "release_date": "2024-05-14T13:13:16.679083",
152
+ "rights": "Public Domain",
153
+ "source_chars": 208847,
154
+ "talkie_tokens": 47451,
155
+ "title": "Artists Past and Present; Random Studies"
156
+ },
157
+ {
158
+ "author": "",
159
+ "chars": 333015,
160
+ "gutenberg_id": "31945",
161
+ "language": "en",
162
+ "metadata_author": "Kálmán Mikszáth",
163
+ "metadata_title": "St. Peter's Umbrella: A Novel",
164
+ "publication_year": 1895,
165
+ "release_date": "2024-05-14T13:13:16.762160",
166
+ "rights": "Public Domain",
167
+ "source_chars": 333015,
168
+ "talkie_tokens": 83162,
169
+ "title": "St. Peter's Umbrella: A Novel"
170
+ },
171
+ {
172
+ "author": "",
173
+ "chars": 354670,
174
+ "gutenberg_id": "31949",
175
+ "language": "en",
176
+ "metadata_author": "Louis Tracy",
177
+ "metadata_title": "The Bartlett Mystery",
178
+ "publication_year": 1919,
179
+ "release_date": "2024-05-14T13:13:16.974990",
180
+ "rights": "Public Domain",
181
+ "source_chars": 354670,
182
+ "talkie_tokens": 85595,
183
+ "title": "The Bartlett Mystery"
184
+ },
185
+ {
186
+ "author": "",
187
+ "chars": 500000,
188
+ "gutenberg_id": "31953",
189
+ "language": "en",
190
+ "metadata_author": "David W. Bone",
191
+ "metadata_title": "Merchantmen-at-arms : the British merchants' service in the war",
192
+ "publication_year": 1919,
193
+ "release_date": "2024-05-14T13:13:17.258494",
194
+ "rights": "Public Domain",
195
+ "source_chars": 505718,
196
+ "talkie_tokens": 119731,
197
+ "title": "Merchantmen-at-arms : the British merchants' service in the war"
198
+ },
199
+ {
200
+ "author": "",
201
+ "chars": 418986,
202
+ "gutenberg_id": "31965",
203
+ "language": "en",
204
+ "metadata_author": "Charles Rudy",
205
+ "metadata_title": "The Cathedrals of Northern Spain",
206
+ "publication_year": 1906,
207
+ "release_date": "2024-05-14T13:13:17.508339",
208
+ "rights": "Public Domain",
209
+ "source_chars": 418986,
210
+ "talkie_tokens": 101809,
211
+ "title": "The Cathedrals of Northern Spain\r\nTheir History and Their Architecture; Together with Much of Interest Concerning the Bishops, Rulers and Other Personages Identified with Them"
212
+ },
213
+ {
214
+ "author": "",
215
+ "chars": 431361,
216
+ "gutenberg_id": "31966",
217
+ "language": "en",
218
+ "metadata_author": "John A. Gade",
219
+ "metadata_title": "Cathedrals of Spain",
220
+ "publication_year": 1911,
221
+ "release_date": "2024-05-14T13:13:17.549892",
222
+ "rights": "Public Domain",
223
+ "source_chars": 431361,
224
+ "talkie_tokens": 102302,
225
+ "title": "Cathedrals of Spain"
226
+ },
227
+ {
228
+ "author": "",
229
+ "chars": 116058,
230
+ "gutenberg_id": "31982",
231
+ "language": "en",
232
+ "metadata_author": "Mrs. De Salis",
233
+ "metadata_title": "Dressed Game and Poultry à la Mode",
234
+ "publication_year": 1888,
235
+ "release_date": "2024-05-14T13:13:17.798342",
236
+ "rights": "Public Domain",
237
+ "source_chars": 116058,
238
+ "talkie_tokens": 30246,
239
+ "title": "Dressed Game and Poultry à la Mode"
240
+ },
241
+ {
242
+ "author": "",
243
+ "chars": 434608,
244
+ "gutenberg_id": "32005",
245
+ "language": "en",
246
+ "metadata_author": "Robert Borland",
247
+ "metadata_title": "Border Raids and Reivers",
248
+ "publication_year": 1898,
249
+ "release_date": "2024-05-14T13:13:19.955617",
250
+ "rights": "Public Domain",
251
+ "source_chars": 434608,
252
+ "talkie_tokens": 102860,
253
+ "title": "Border Raids and Reivers"
254
+ },
255
+ {
256
+ "author": "",
257
+ "chars": 143751,
258
+ "gutenberg_id": "32012",
259
+ "language": "en",
260
+ "metadata_author": "",
261
+ "metadata_title": "A Narrative of the Shipwreck, Captivity and Sufferings of Horace Holden and…",
262
+ "publication_year": 1836,
263
+ "release_date": "2024-05-14T13:13:20.089227",
264
+ "rights": "Public Domain",
265
+ "source_chars": 143751,
266
+ "talkie_tokens": 34545,
267
+ "title": "A Narrative of the Shipwreck, Captivity and Sufferings of Horace Holden and Benj. H. Nute\r\nWho were cast away in the American ship Mentor, on the Pelew Islands, in the year 1832; and for two years afterwards were subjected to unheard of sufferings among the barbarous inhabitants of Lord North's island"
268
+ },
269
+ {
270
+ "author": "",
271
+ "chars": 268033,
272
+ "gutenberg_id": "32037",
273
+ "language": "en",
274
+ "metadata_author": "Edgar Allan Poe",
275
+ "metadata_title": "Eureka: A Prose Poem",
276
+ "publication_year": 1848,
277
+ "release_date": "2024-05-14T13:13:20.548855",
278
+ "rights": "Public Domain",
279
+ "source_chars": 268033,
280
+ "talkie_tokens": 63183,
281
+ "title": "Eureka: A Prose Poem"
282
+ },
283
+ {
284
+ "author": "",
285
+ "chars": 313519,
286
+ "gutenberg_id": "32044",
287
+ "language": "en",
288
+ "metadata_author": "Hugh S. Fullerton",
289
+ "metadata_title": "Jimmy Kirkland and the Plot for a Pennant",
290
+ "publication_year": 1915,
291
+ "release_date": "2024-05-14T13:13:20.658680",
292
+ "rights": "Public Domain",
293
+ "source_chars": 313519,
294
+ "talkie_tokens": 76130,
295
+ "title": "Jimmy Kirkland and the Plot for a Pennant"
296
+ },
297
+ {
298
+ "author": "",
299
+ "chars": 234206,
300
+ "gutenberg_id": "32048",
301
+ "language": "en",
302
+ "metadata_author": "",
303
+ "metadata_title": "Cottage Building in Cob, Pisé, Chalk and Clay: A Renaissance (2nd edition)",
304
+ "publication_year": 1920,
305
+ "release_date": "2024-05-14T13:13:20.891721",
306
+ "rights": "Public Domain",
307
+ "source_chars": 234206,
308
+ "talkie_tokens": 56858,
309
+ "title": "Cottage Building in Cob, Pisé, Chalk and Clay: A Renaissance (2nd edition)"
310
+ },
311
+ {
312
+ "author": "",
313
+ "chars": 233002,
314
+ "gutenberg_id": "32051",
315
+ "language": "en",
316
+ "metadata_author": "Gilbert Nobbs",
317
+ "metadata_title": "On the right of the British line",
318
+ "publication_year": 1917,
319
+ "release_date": "2024-05-14T13:13:21.033601",
320
+ "rights": "Public Domain",
321
+ "source_chars": 233002,
322
+ "talkie_tokens": 54946,
323
+ "title": "On the right of the British line"
324
+ },
325
+ {
326
+ "author": "",
327
+ "chars": 314318,
328
+ "gutenberg_id": "32052",
329
+ "language": "en",
330
+ "metadata_author": "Fullerton L. Waldo",
331
+ "metadata_title": "Grenfell: Knight-Errant of the North",
332
+ "publication_year": 1924,
333
+ "release_date": "2024-05-14T13:13:21.058711",
334
+ "rights": "Public Domain",
335
+ "source_chars": 314320,
336
+ "talkie_tokens": 77007,
337
+ "title": "Grenfell: Knight-Errant of the North"
338
+ },
339
+ {
340
+ "author": "",
341
+ "chars": 153882,
342
+ "gutenberg_id": "32058",
343
+ "language": "en",
344
+ "metadata_author": "active 1787-1834 Jesse Torrey",
345
+ "metadata_title": "American Slave Trade",
346
+ "publication_year": 1822,
347
+ "release_date": "2024-05-14T13:13:21.277180",
348
+ "rights": "Public Domain",
349
+ "source_chars": 153882,
350
+ "talkie_tokens": 34595,
351
+ "title": "American Slave Trade\r\nOr, An Account of the Manner in which the Slave Dealers take Free People from some of the United States of America, and carry them away, and sell them as Slaves in other of the States; and of the horrible Cruelties practised in the carrying on of this most infamous Traffic"
352
+ },
353
+ {
354
+ "author": "",
355
+ "chars": 500000,
356
+ "gutenberg_id": "32066",
357
+ "language": "en",
358
+ "metadata_author": "Zelia Nuttall",
359
+ "metadata_title": "The Fundamental Principles of Old and New World Civilizations",
360
+ "publication_year": 1901,
361
+ "release_date": "2024-05-14T13:13:21.546110",
362
+ "rights": "Public Domain",
363
+ "source_chars": 1528845,
364
+ "talkie_tokens": 116144,
365
+ "title": "The Fundamental Principles of Old and New World Civilizations\r\nA Comparative Research Based on a Study of the Ancient Mexican Religious, Sociological, and Calendrical Systems"
366
+ },
367
+ {
368
+ "author": "",
369
+ "chars": 500000,
370
+ "gutenberg_id": "3207",
371
+ "language": "en",
372
+ "metadata_author": "Thomas Hobbes",
373
+ "metadata_title": "Leviathan",
374
+ "publication_year": 1651,
375
+ "release_date": "2024-05-14T13:13:21.720655",
376
+ "rights": "Public Domain",
377
+ "source_chars": 1212461,
378
+ "talkie_tokens": 121976,
379
+ "title": "Leviathan"
380
+ },
381
+ {
382
+ "author": "",
383
+ "chars": 123487,
384
+ "gutenberg_id": "32074",
385
+ "language": "en",
386
+ "metadata_author": "",
387
+ "metadata_title": "Book Repair and Restoration: A Manual of Practical Suggestions for Bibliophiles",
388
+ "publication_year": 1918,
389
+ "release_date": "2024-05-14T13:13:21.972595",
390
+ "rights": "Public Domain",
391
+ "source_chars": 123487,
392
+ "talkie_tokens": 28829,
393
+ "title": "Book Repair and Restoration: A Manual of Practical Suggestions for Bibliophiles"
394
+ },
395
+ {
396
+ "author": "",
397
+ "chars": 320791,
398
+ "gutenberg_id": "32094",
399
+ "language": "en",
400
+ "metadata_author": "L. Frank Baum",
401
+ "metadata_title": "The Patchwork Girl of Oz",
402
+ "publication_year": 1913,
403
+ "release_date": "2024-05-14T13:13:22.367097",
404
+ "rights": "Public Domain",
405
+ "source_chars": 320791,
406
+ "talkie_tokens": 78894,
407
+ "title": "The Patchwork Girl of Oz"
408
+ },
409
+ {
410
+ "author": "",
411
+ "chars": 500000,
412
+ "gutenberg_id": "32109",
413
+ "language": "en",
414
+ "metadata_author": "Wilhelm Hauff",
415
+ "metadata_title": "Tales of the Caravan, Inn, and Palace",
416
+ "publication_year": 1882,
417
+ "release_date": "2024-05-14T13:13:22.850247",
418
+ "rights": "Public Domain",
419
+ "source_chars": 691251,
420
+ "talkie_tokens": 118658,
421
+ "title": "Tales of the Caravan, Inn, and Palace"
422
+ },
423
+ {
424
+ "author": "",
425
+ "chars": 250746,
426
+ "gutenberg_id": "32110",
427
+ "language": "en",
428
+ "metadata_author": "Richmond",
429
+ "metadata_title": "Montezuma: An Epic on the Origin and Fate of the Aztec Nation",
430
+ "publication_year": 1885,
431
+ "release_date": "2024-05-14T13:13:22.915880",
432
+ "rights": "Public Domain",
433
+ "source_chars": 250746,
434
+ "talkie_tokens": 57811,
435
+ "title": "Montezuma: An Epic on the Origin and Fate of the Aztec Nation"
436
+ },
437
+ {
438
+ "author": "",
439
+ "chars": 210157,
440
+ "gutenberg_id": "32111",
441
+ "language": "en",
442
+ "metadata_author": "Reichardt",
443
+ "metadata_title": "Diary of Battery A, First Regiment Rhode Island Light Artillery",
444
+ "publication_year": 1865,
445
+ "release_date": "2024-05-14T13:13:22.950780",
446
+ "rights": "Public Domain",
447
+ "source_chars": 210157,
448
+ "talkie_tokens": 49874,
449
+ "title": "Diary of Battery A, First Regiment Rhode Island Light Artillery"
450
+ },
451
+ {
452
+ "author": "",
453
+ "chars": 148481,
454
+ "gutenberg_id": "32118",
455
+ "language": "en",
456
+ "metadata_author": "",
457
+ "metadata_title": "Child Versus Parent: Some Chapters on the Irrepressible Conflict in the Home",
458
+ "publication_year": 1922,
459
+ "release_date": "2024-05-14T13:13:23.234839",
460
+ "rights": "Public Domain",
461
+ "source_chars": 148481,
462
+ "talkie_tokens": 33049,
463
+ "title": "Child Versus Parent: Some Chapters on the Irrepressible Conflict in the Home"
464
+ },
465
+ {
466
+ "author": "",
467
+ "chars": 346962,
468
+ "gutenberg_id": "32125",
469
+ "language": "en",
470
+ "metadata_author": "G. B. Malleson",
471
+ "metadata_title": "Rulers of India: Lord Clive",
472
+ "publication_year": 1893,
473
+ "release_date": "2024-05-14T13:13:23.438571",
474
+ "rights": "Public Domain",
475
+ "source_chars": 346962,
476
+ "talkie_tokens": 88690,
477
+ "title": "Rulers of India: Lord Clive"
478
+ },
479
+ {
480
+ "author": "",
481
+ "chars": 327285,
482
+ "gutenberg_id": "32135",
483
+ "language": "en",
484
+ "metadata_author": "Amelia E. Barr",
485
+ "metadata_title": "Maids, Wives, and Bachelors",
486
+ "publication_year": 1898,
487
+ "release_date": "2024-05-14T13:13:23.655329",
488
+ "rights": "Public Domain",
489
+ "source_chars": 327287,
490
+ "talkie_tokens": 74081,
491
+ "title": "Maids, Wives, and Bachelors"
492
+ },
493
+ {
494
+ "author": "",
495
+ "chars": 450865,
496
+ "gutenberg_id": "32136",
497
+ "language": "en",
498
+ "metadata_author": "Jean Calvin",
499
+ "metadata_title": "A Treatise on Relics",
500
+ "publication_year": 1543,
501
+ "release_date": "2024-05-14T13:13:23.690287",
502
+ "rights": "Public Domain",
503
+ "source_chars": 450865,
504
+ "talkie_tokens": 102960,
505
+ "title": "A Treatise on Relics"
506
+ },
507
+ {
508
+ "author": "",
509
+ "chars": 500000,
510
+ "gutenberg_id": "32158",
511
+ "language": "en",
512
+ "metadata_author": "",
513
+ "metadata_title": "Rural Wealth and Welfare: Economic Principles Illustrated and Applied in Farm…",
514
+ "publication_year": 1900,
515
+ "release_date": "2024-05-14T13:13:24.259747",
516
+ "rights": "Public Domain",
517
+ "source_chars": 590258,
518
+ "talkie_tokens": 104638,
519
+ "title": "Rural Wealth and Welfare: Economic Principles Illustrated and Applied in Farm Life"
520
+ },
521
+ {
522
+ "author": "",
523
+ "chars": 223664,
524
+ "gutenberg_id": "32164",
525
+ "language": "en",
526
+ "metadata_author": "George Palmer Putnam",
527
+ "metadata_title": "In the Oregon Country",
528
+ "publication_year": 1915,
529
+ "release_date": "2024-05-14T13:13:24.362538",
530
+ "rights": "Public Domain",
531
+ "source_chars": 223664,
532
+ "talkie_tokens": 51950,
533
+ "title": "In the Oregon Country\r\nOut-Doors in Oregon, Washington, and California Together with some Legendary Lore, and Glimpses of the Modern West in the Making"
534
+ },
535
+ {
536
+ "author": "",
537
+ "chars": 160627,
538
+ "gutenberg_id": "32171",
539
+ "language": "en",
540
+ "metadata_author": "Richard Mead",
541
+ "metadata_title": "A Discourse on the Plague",
542
+ "publication_year": 1744,
543
+ "release_date": "2024-05-14T13:13:24.480942",
544
+ "rights": "Public Domain",
545
+ "source_chars": 160627,
546
+ "talkie_tokens": 41265,
547
+ "title": "A Discourse on the Plague"
548
+ },
549
+ {
550
+ "author": "",
551
+ "chars": 500000,
552
+ "gutenberg_id": "32176",
553
+ "language": "en",
554
+ "metadata_author": "E. Lynn Linton",
555
+ "metadata_title": "Witch Stories",
556
+ "publication_year": 1861,
557
+ "release_date": "2024-05-14T13:13:24.580009",
558
+ "rights": "Public Domain",
559
+ "source_chars": 743390,
560
+ "talkie_tokens": 122716,
561
+ "title": "Witch Stories"
562
+ },
563
+ {
564
+ "author": "",
565
+ "chars": 500000,
566
+ "gutenberg_id": "32178",
567
+ "language": "en",
568
+ "metadata_author": "",
569
+ "metadata_title": "Los gringos; or, An inside view of Mexico and California : with wanderings in…",
570
+ "publication_year": 1849,
571
+ "release_date": "2024-05-14T13:13:24.666608",
572
+ "rights": "Public Domain",
573
+ "source_chars": 780012,
574
+ "talkie_tokens": 118038,
575
+ "title": "Los Gringos\nOr, An Inside View of Mexico and California, with Wanderings in Peru, Chili, and Polynesia"
576
+ },
577
+ {
578
+ "author": "",
579
+ "chars": 500000,
580
+ "gutenberg_id": "32183",
581
+ "language": "en",
582
+ "metadata_author": "T. F. Thiselton-Dyer",
583
+ "metadata_title": "Folk-lore of Shakespeare",
584
+ "publication_year": 1884,
585
+ "release_date": "2024-05-14T13:13:25.114348",
586
+ "rights": "Public Domain",
587
+ "source_chars": 1062784,
588
+ "talkie_tokens": 133992,
589
+ "title": "Folk-lore of Shakespeare"
590
+ },
591
+ {
592
+ "author": "",
593
+ "chars": 355965,
594
+ "gutenberg_id": "32188",
595
+ "language": "en",
596
+ "metadata_author": "King of England Charles I and John Gauden",
597
+ "metadata_title": "Eikon Basilike",
598
+ "publication_year": 1649,
599
+ "release_date": "2024-05-14T13:13:25.297972",
600
+ "rights": "Public Domain",
601
+ "source_chars": 355965,
602
+ "talkie_tokens": 85265,
603
+ "title": "Eikon Basilike\nThe Pourtracture of His Sacred Majestie, in His Solitudes and Sufferings"
604
+ },
605
+ {
606
+ "author": "",
607
+ "chars": 167159,
608
+ "gutenberg_id": "32195",
609
+ "language": "en",
610
+ "metadata_author": "Hilaire Belloc",
611
+ "metadata_title": "The Battle of Blenheim",
612
+ "publication_year": 1911,
613
+ "release_date": "2024-05-14T13:13:25.548877",
614
+ "rights": "Public Domain",
615
+ "source_chars": 167159,
616
+ "talkie_tokens": 37936,
617
+ "title": "The Battle of Blenheim"
618
+ },
619
+ {
620
+ "author": "",
621
+ "chars": 121601,
622
+ "gutenberg_id": "32196",
623
+ "language": "en",
624
+ "metadata_author": "Hilaire Belloc",
625
+ "metadata_title": "Crécy",
626
+ "publication_year": 1912,
627
+ "release_date": "2024-05-14T13:13:25.567155",
628
+ "rights": "Public Domain",
629
+ "source_chars": 121601,
630
+ "talkie_tokens": 28008,
631
+ "title": "Crécy"
632
+ },
633
+ {
634
+ "author": "",
635
+ "chars": 127015,
636
+ "gutenberg_id": "32197",
637
+ "language": "en",
638
+ "metadata_author": "Hilaire Belloc",
639
+ "metadata_title": "Poitiers",
640
+ "publication_year": 1913,
641
+ "release_date": "2024-05-14T13:13:25.581498",
642
+ "rights": "Public Domain",
643
+ "source_chars": 127015,
644
+ "talkie_tokens": 29143,
645
+ "title": "Poitiers"
646
+ },
647
+ {
648
+ "author": "",
649
+ "chars": 500000,
650
+ "gutenberg_id": "322",
651
+ "language": "en",
652
+ "metadata_author": "Stevenson",
653
+ "metadata_title": "St. Ives: Being the Adventures of a French Prisoner in England",
654
+ "publication_year": 1897,
655
+ "release_date": "2024-05-14T13:13:25.707588",
656
+ "rights": "Public Domain",
657
+ "source_chars": 559769,
658
+ "talkie_tokens": 126469,
659
+ "title": "St. Ives: Being the Adventures of a French Prisoner in England"
660
+ },
661
+ {
662
+ "author": "",
663
+ "chars": 474701,
664
+ "gutenberg_id": "32202",
665
+ "language": "en",
666
+ "metadata_author": "Alfred Perceval Graves and George Denham",
667
+ "metadata_title": "The Irish Fairy Book",
668
+ "publication_year": 1909,
669
+ "release_date": "2024-05-14T13:13:25.828258",
670
+ "rights": "Public Domain",
671
+ "source_chars": 474701,
672
+ "talkie_tokens": 122564,
673
+ "title": "The Irish Fairy Book"
674
+ },
675
+ {
676
+ "author": "",
677
+ "chars": 432908,
678
+ "gutenberg_id": "32205",
679
+ "language": "en",
680
+ "metadata_author": "",
681
+ "metadata_title": "The Woodlands orchids, described and illustrated : with stories of orchid-…",
682
+ "publication_year": 1901,
683
+ "release_date": "2024-05-14T13:13:25.972955",
684
+ "rights": "Public Domain",
685
+ "source_chars": 432908,
686
+ "talkie_tokens": 106622,
687
+ "title": "The Woodlands Orchids, Described and Illustrated\r\nWith Stories of Orchid-Collecting"
688
+ },
689
+ {
690
+ "author": "",
691
+ "chars": 229536,
692
+ "gutenberg_id": "32206",
693
+ "language": "en",
694
+ "metadata_author": "Charles Rendell Mabey",
695
+ "metadata_title": "The Utah Batteries: A History",
696
+ "publication_year": 1900,
697
+ "release_date": "2024-05-14T13:13:26.008042",
698
+ "rights": "Public Domain",
699
+ "source_chars": 229536,
700
+ "talkie_tokens": 51218,
701
+ "title": "The Utah Batteries: A History\r\nA complete account of the muster-in, sea voyage, battles, skirmishes and barrack life of the Utah batteries, together with biographies of officers and muster-out rolls."
702
+ },
703
+ {
704
+ "author": "",
705
+ "chars": 115428,
706
+ "gutenberg_id": "32210",
707
+ "language": "en",
708
+ "metadata_author": "Palmer Cox",
709
+ "metadata_title": "The Brownies: Their Book",
710
+ "publication_year": 1879,
711
+ "release_date": "2024-05-14T13:13:26.056295",
712
+ "rights": "Public Domain",
713
+ "source_chars": 115431,
714
+ "talkie_tokens": 25992,
715
+ "title": "The Brownies: Their Book"
716
+ },
717
+ {
718
+ "author": "",
719
+ "chars": 145768,
720
+ "gutenberg_id": "32216",
721
+ "language": "en",
722
+ "metadata_author": "Freiherr von E. Spiegel",
723
+ "metadata_title": "The Adventures of the U-202: An Actual Narrative",
724
+ "publication_year": 1917,
725
+ "release_date": "2024-05-14T13:13:27.690912",
726
+ "rights": "Public Domain",
727
+ "source_chars": 145768,
728
+ "talkie_tokens": 34134,
729
+ "title": "The Adventures of the U-202: An Actual Narrative"
730
+ },
731
+ {
732
+ "author": "",
733
+ "chars": 241257,
734
+ "gutenberg_id": "32219",
735
+ "language": "en",
736
+ "metadata_author": "Chamisso et al.",
737
+ "metadata_title": "The Marvellous History of the Shadowless Man, and The Cold Heart",
738
+ "publication_year": 1814,
739
+ "release_date": "2024-05-14T13:13:27.756957",
740
+ "rights": "Public Domain",
741
+ "source_chars": 241257,
742
+ "talkie_tokens": 57350,
743
+ "title": "The Marvellous History of the Shadowless Man, and The Cold Heart"
744
+ },
745
+ {
746
+ "author": "",
747
+ "chars": 265834,
748
+ "gutenberg_id": "32223",
749
+ "language": "en",
750
+ "metadata_author": "E. T. A. Hoffmann",
751
+ "metadata_title": "Specimens of German Romance; Vol. II. Master Flea",
752
+ "publication_year": 1822,
753
+ "release_date": "2024-05-14T13:13:27.873796",
754
+ "rights": "Public Domain",
755
+ "source_chars": 265834,
756
+ "talkie_tokens": 64492,
757
+ "title": "Specimens of German Romance; Vol. II. Master Flea"
758
+ },
759
+ {
760
+ "author": "",
761
+ "chars": 500000,
762
+ "gutenberg_id": "32224",
763
+ "language": "en",
764
+ "metadata_author": "Thomas Hughes",
765
+ "metadata_title": "Tom Brown's School Days",
766
+ "publication_year": 1857,
767
+ "release_date": "2024-05-14T13:13:27.901924",
768
+ "rights": "Public Domain",
769
+ "source_chars": 601494,
770
+ "talkie_tokens": 120881,
771
+ "title": "Tom Brown's School Days"
772
+ },
773
+ {
774
+ "author": "",
775
+ "chars": 443590,
776
+ "gutenberg_id": "32234",
777
+ "language": "en",
778
+ "metadata_author": "Jókai",
779
+ "metadata_title": "The Lion of Janina; Or, The Last Days of the Janissaries: A Turkish Novel",
780
+ "publication_year": 1898,
781
+ "release_date": "2024-05-14T13:13:28.149844",
782
+ "rights": "Public Domain",
783
+ "source_chars": 443590,
784
+ "talkie_tokens": 106302,
785
+ "title": "The Lion of Janina; Or, The Last Days of the Janissaries: A Turkish Novel"
786
+ },
787
+ {
788
+ "author": "",
789
+ "chars": 131174,
790
+ "gutenberg_id": "32239",
791
+ "language": "en",
792
+ "metadata_author": "St. George Tucker",
793
+ "metadata_title": "Dissertation on Slavery",
794
+ "publication_year": 1796,
795
+ "release_date": "2024-05-14T13:13:28.293843",
796
+ "rights": "Public Domain",
797
+ "source_chars": 131174,
798
+ "talkie_tokens": 30894,
799
+ "title": "Dissertation on Slavery\r\nWith a Proposal for the Gradual Abolition of it, in the State of Virginia"
800
+ },
801
+ {
802
+ "author": "",
803
+ "chars": 457970,
804
+ "gutenberg_id": "32250",
805
+ "language": "en",
806
+ "metadata_author": "",
807
+ "metadata_title": "American Red Cross Text-Book on Home Hygiene and Care of the Sick",
808
+ "publication_year": 1918,
809
+ "release_date": "2024-05-14T13:13:28.573244",
810
+ "rights": "Public Domain",
811
+ "source_chars": 457970,
812
+ "talkie_tokens": 103903,
813
+ "title": "American Red Cross Text-Book on Home Hygiene and Care of the Sick"
814
+ },
815
+ {
816
+ "author": "",
817
+ "chars": 148286,
818
+ "gutenberg_id": "32251",
819
+ "language": "en",
820
+ "metadata_author": "Frank Overton",
821
+ "metadata_title": "Applied Physiology, Including the Effects of Alcohol and Narcotics",
822
+ "publication_year": 1910,
823
+ "release_date": "2024-05-14T13:13:28.613768",
824
+ "rights": "Public Domain",
825
+ "source_chars": 148286,
826
+ "talkie_tokens": 37479,
827
+ "title": "Applied Physiology, Including the Effects of Alcohol and Narcotics"
828
+ },
829
+ {
830
+ "author": "",
831
+ "chars": 398276,
832
+ "gutenberg_id": "32261",
833
+ "language": "en",
834
+ "metadata_author": "Max O'Rell",
835
+ "metadata_title": "A Frenchman in America: Recollections of Men and Things",
836
+ "publication_year": 1891,
837
+ "release_date": "2024-05-14T13:13:28.742266",
838
+ "rights": "Public Domain",
839
+ "source_chars": 398276,
840
+ "talkie_tokens": 94194,
841
+ "title": "A Frenchman in America: Recollections of Men and Things"
842
+ },
843
+ {
844
+ "author": "",
845
+ "chars": 137708,
846
+ "gutenberg_id": "32268",
847
+ "language": "en",
848
+ "metadata_author": "B. S. Schneck",
849
+ "metadata_title": "The Burning of Chambersburg, Pennsylvania",
850
+ "publication_year": 1864,
851
+ "release_date": "2024-05-14T13:13:28.982993",
852
+ "rights": "Public Domain",
853
+ "source_chars": 137708,
854
+ "talkie_tokens": 31987,
855
+ "title": "The Burning of Chambersburg, Pennsylvania"
856
+ },
857
+ {
858
+ "author": "",
859
+ "chars": 500000,
860
+ "gutenberg_id": "32271",
861
+ "language": "en",
862
+ "metadata_author": "Felix Dahn",
863
+ "metadata_title": "A Struggle for Rome, v. 1",
864
+ "publication_year": 1876,
865
+ "release_date": "2024-05-14T13:13:29.099088",
866
+ "rights": "Public Domain",
867
+ "source_chars": 590387,
868
+ "talkie_tokens": 120159,
869
+ "title": "A Struggle for Rome, v. 1"
870
+ },
871
+ {
872
+ "author": "",
873
+ "chars": 335128,
874
+ "gutenberg_id": "32273",
875
+ "language": "en",
876
+ "metadata_author": "Jesse Lyman Hurlbut",
877
+ "metadata_title": "Stories of Our Naval Heroes Every Child Can Read",
878
+ "publication_year": 1908,
879
+ "release_date": "2024-05-14T13:13:29.163779",
880
+ "rights": "Public Domain",
881
+ "source_chars": 335128,
882
+ "talkie_tokens": 80046,
883
+ "title": "Stories of Our Naval Heroes Every Child Can Read"
884
+ },
885
+ {
886
+ "author": "",
887
+ "chars": 295041,
888
+ "gutenberg_id": "32280",
889
+ "language": "en",
890
+ "metadata_author": "Percy Dearmer",
891
+ "metadata_title": "Bell's Cathedrals: The Cathedral Church of Wells",
892
+ "publication_year": 1899,
893
+ "release_date": "2024-05-14T13:13:29.302741",
894
+ "rights": "Public Domain",
895
+ "source_chars": 295041,
896
+ "talkie_tokens": 70477,
897
+ "title": "Bell's Cathedrals: The Cathedral Church of Wells\nA Description of Its Fabric and a Brief History of the Episcopal See"
898
+ },
899
+ {
900
+ "author": "",
901
+ "chars": 406389,
902
+ "gutenberg_id": "32289",
903
+ "language": "en",
904
+ "metadata_author": "Adeline Trafton",
905
+ "metadata_title": "An American Girl Abroad",
906
+ "publication_year": 1872,
907
+ "release_date": "2024-05-14T13:13:29.424517",
908
+ "rights": "Public Domain",
909
+ "source_chars": 406389,
910
+ "talkie_tokens": 96254,
911
+ "title": "An American Girl Abroad"
912
+ }
913
+ ],
914
+ "config": null,
915
+ "counts": {
916
+ "seen": 18614,
917
+ "skip_existing": 3146,
918
+ "skip_filter": 247,
919
+ "skip_missing_year_metadata": 14503,
920
+ "skip_short": 653,
921
+ "written": 65
922
+ },
923
+ "dataset": "common-pile/project_gutenberg_filtered",
924
+ "existing_counts": null,
925
+ "filters": {
926
+ "languages": [
927
+ "en"
928
+ ],
929
+ "max_year": 1930,
930
+ "min_chars": 100000,
931
+ "min_year": 1500,
932
+ "rights_contains": "public domain",
933
+ "strip_gutenberg_boilerplate": true
934
+ },
935
+ "metadata_columns": {
936
+ "author": "author",
937
+ "id": "gutenberg_id",
938
+ "publication_year": "publication_year",
939
+ "title": "title"
940
+ },
941
+ "metadata_csv": "data/kaggle_gutenberg_publication_years/gutenberg_publication_years.csv",
942
+ "split": "train",
943
+ "total_talkie_tokens": 5074819
944
+ }