Dataset Viewer
Auto-converted to Parquet Duplicate
doc_id
int64
0
4.09k
sent_id
int64
0
385k
text
stringlengths
20
1k
0
0
i wish i had a better answer to that question .
0
1
starlings , new york is not the place youd expect much to happen .
0
2
its a small quiet town , the kind where everyone knows your name .
0
3
its a place where your parents wouldnt even care if you stayed out late biking with your friends .
0
4
they dont know the half of it .
0
5
i know it all and starlings is not the place where you want to be after dark .
0
6
the only reason why no one knows this is because jason , emily , seth and i have kept it that way .
0
7
i walked along the empty road alone , occasionally waving to passing kids on bikes .
0
8
my backpack was slung over my shoulder , filled with my writing books and sketchpads .
0
9
i kept my eyes on the shadowed road , watching my every step .
0
10
usually i was more aware of my surroundings , but today i was tired and didnt care if i rammed into a tree .
0
11
i kicked a rock into the grass .
0
12
the sun was starting to set , painting the sky in brilliant oranges and reds .
0
13
it slipped down the sky , allowing the first stars to peek out from behind the bright curtain .
0
14
the remaining light cast shadows over everything , creating the illusion that there was double of everything .
0
15
the world prepared to go into its hours of unreal silence that made it seem magical , and it really was .
0
16
my phone buzzed and i awoke from my trance .
0
17
i thumbed the keypad and opened the message seth had sent me .
0
18
it read : whatcha doing ?
0
19
i flipped open the pad and wrote : walking home .
0
20
i shoved it back in my pocket and continued walking .
0
21
the sun was almost gone and shadows were starting to appear behind everything .
0
22
i looked at my own shadow , that danced behind me .
0
23
the phone buzzed again as seth sent me a reply .
0
24
do you want me to meet you ?
0
25
i glanced at the nearby woods .
0
26
my ears heard nothing and i didnt see any movement but my hands shook slightly as i typed , nothing , im fine .
0
27
i didnt open his reply because i knew what it would say .
0
28
i already knew that it was strangely quiet .
0
29
maybe i could stay home and sleep one night .
0
30
or maybe i could finish a painting tonight and watch mom do origami .
0
31
i turned the corner , and my house came into view .
0
32
i started to climb the hill when i froze .
0
33
out of my left eye i saw the outline of a creature .
0
34
it was heading through the woods in the direction of my house .
0
35
i swore under my breath and took off for the woods .
0
36
my feet crunched on the fallen branches and leaves .
0
37
i could see the creature ahead of me .
0
38
i didnt have much time .
0
39
i placed my bag on the ground and crossed my legs .
0
40
i started to grab my phone but stopped .
0
41
i didnt need to tell the others , it was just one .
0
42
and if i was lucky , it would be an easy take down .
0
43
i closed my eyes and began my mental countdown .
0
44
the wind picked up around me , as if a wind current had just appeared out of nowhere .
0
45
5 my body started to feel hot , like i was being hugged by the sun .
0
46
4 power surged through me as i was freed from my human self .
0
47
3 i felt cold , like being dipped in ice water .
0
48
the breeze picked up even harder .
0
49
2 i was hollow and could probably see my own body if i opened my eyes .
0
50
but i could never get the courage to do that .
0
51
my body felt normal except it was different .
0
52
i opened my eyes and looked over to where i just had been or still was .
0
53
my human body slightly glowed as it sat in meditation under the tree .
0
54
i could see the monster clearly now that i had stepped into its world .
0
55
it was hunched over , occasionally touching the ground with one of its curled front paws .
0
56
dark saliva dripped out of its mouth .
0
57
the beady black eyes made it no less scary .
0
58
i knew exactly what it is .
0
59
a shiver ran down my spine .
0
60
thrashers were probably one of the most feral and nasty monsters ive ever encountered .
0
61
they sometimes travel alone or hunt in packs .
0
62
theyre awful in packs , extremely hard to take out without their knowledge of your presence .
0
63
i placed an arrow in my bow , and aimed for the head .
0
64
i couldnt let the creature reach my house .
0
65
i pulled back the string , and then stopped .
0
66
i couldnt take out one of these like , this unless i set it on fire .
0
67
i could take it out with a few arrows but its best to kill thrashers before they realize youre there .
0
68
instead i lowered my bow and slowly crept up to it , until i could see the hideous claws on its hands and the hatred in its eyes .
0
69
thrashers hate everything and sometimes i wonder how they tolerate each other .
0
70
i aimed for the head again and released the arrow .
0
71
it whizzed silently into the thrasher and it howled in pain as the arrow dug into its fur .
0
72
it whirled around , facing me .
0
73
a low growl sounded in its throat and it charged .
0
74
i ducked as it slashed my side and i winced .
0
75
my shirt slowly turned blue from the trickling wound .
0
76
yes , blue , my blood is blue .
0
77
it turned back around and threw its self at me .
0
78
this time i was prepared .
0
79
i pulled out my hunting knife out just as he landed on me .
0
80
he yelped and went limp .
0
81
i pushed him off and grabbed my fallen bow , the familiar feeling of the wood boosting my confidence .
0
82
i turned back around and started back where i left off , but then a body slammed into me .
0
83
i just had enough time to see the thrasher , before the fur and dirt filled my vision .
0
84
i spit out the clump of wiry hair that had somehow found its way into my gasping mouth .
0
85
i felt a searing pain as the thrasher raked my left leg .
0
86
i closed my eyes against the pain , trying to focus myself against the dull throb in my shin .
0
87
then the thrasher went limp against me .
0
88
it was hauled off of my body and i found myself looking up into the face of a very unhappy dark blue haired boy .
0
89
his sword was gripped tightly in his clenched fingers and a look of amusement , or many it was anger , shone on his face .
0
90
i swallowed and collected my weapons from the ground , not daring to look at my leg .
0
91
hi seth , this is unexpected .
0
92
seth glared at me and pulled me up .
0
93
he was definitely angry at me .
0
94
i tried to place weight on my leg but winced as pain shot up it .
0
95
he kicked the dead thrasher one more time before sheathing his sword .
0
96
you know better jazell then to take on a monster by yourself .
0
97
you never know what kind it is until you have already changed , he scolded me and i could feel a lecture coming .
0
98
i looked down at leg .
0
99
claw marks ran up my shin and my blue blood was soaking my pants .
End of preview. Expand in Data Studio

BookCorpus — Cleaned for Pre-training LLMs

A cleaned, deduplicated, document-segmented version of SamuelYang/bookcorpus

TL;DR

Property Value
Rows (sentences) 33,649,142
Documents (books) 4,086
Format CSV, 3 columns: doc_id, sent_id, text
Language English (lowercased)
Source SamuelYang/bookcorpus (74,004,228 raw rows)

Schema

Column Type Description
doc_id int Inferred document/book identifier. Sentences sharing the same doc_id come from the same book.
sent_id int Sentence position within its document (0-indexed). Preserves original order.
text string Cleaned sentence text (lowercased, normalized).

How to use it

Quick load

from datasets import load_dataset

ds = load_dataset("kd13/bookcorpus-clean", split="train")
print(ds[0])
# {'doc_id': 0, 'sent_id': 0, 'text': 'i wish i had a better answer ...'}

Cleaning pipeline

Applied in this order to the source dataset:

  1. Unicode + whitespace normalization — NFKC normalization, collapse consecutive whitespace, strip.
  2. Document segmentation — since the source is a flat stream of sentences without book IDs, document boundaries are inferred from telltale markers at the start of books:
    • ISBN lines (e.g. isbn : 1492913731)
    • Copyright declarations (copyright 2013 ...)
    • all rights reserved
    • chapter 1
  3. Line-level filters — sentences are dropped if they:
    • have fewer than 20 or more than 1000 characters
    • match boilerplate patterns (copyright, ISBN, "all rights reserved")
    • have an alphabetic-character ratio below 0.6
    • have a digit ratio above 0.3
    • contain no alphabetic characters
  4. Language filter — cheap English stop-word ratio check (≥ 5% of tokens must be in a small English stop-word set; short lines pass through).
  5. Within-document exact dedup — SHA-1 hashing drops repeated sentences inside the same book (e.g. recurring chapter headers, section dividers). Note: dedup is not applied globally — sentences like "he nodded." occur legitimately across many books.
  6. Document filter — books with fewer than 8 surviving sentences are dropped (not enough context for NSP).
  7. Cross-document near-duplicate removal — a SHA-1 fingerprint of each document's first 5 sentences identifies same-book re-uploads; duplicates are dropped.

Cleaning statistics

Metric Value
Raw rows (sentences) in source 74,004,228
Documents detected 6,779
Documents kept 4,086
Documents dropped (< 8 sentences) 973
Documents dropped (near-duplicate) 1,720
Sentences kept 33,649,142

Drop rate: ~40% of detected documents removed (mostly same-book re-uploads and too-short documents).

Source & licensing

  • Source dataset: SamuelYang/bookcorpus
  • Original corpus: BookCorpus (Zhu et al., 2015), originally scraped from Smashwords. The original BookCorpus has well-documented provenance and consent concerns; downstream users should review them before commercial use.
  • This cleaned derivative is released under the MIT License for the cleaning code and structuring effort. The underlying text retains whatever rights apply to the upstream source.
Downloads last month
-