Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
111
465k
usually , he would be tearing around the living room , playing with his toys . but just one look at a minion sent him practically catatonic . that had been megan 's plan when she got him dressed earlier . he 'd seen the movie almost by mistake , considering he was a little young for the pg cartoon , but with older cous...
with a smirk , sean replied , `` like i 'm gon na let you drive my car . '' he then slid into the driver 's seat as gavin reluctantly walked around to the passenger 's side . `` we 'll see you there in just a few , '' her mother called . sean acknowledged her with a two finger salute before cranking up and pulling down...
as noah sucked on his bottle , he twirled a strand of emma 's auburn hair between his fingers . both father and son were fans of emma wearing her hair down . emma grinned . `` good , i guess . i mean , i do n't have a lot of experience with baptisms . '' megan laughed and motioned to the towel and noah . `` it looks li...
with a shrug , megan replied , `` dating him or just having some fun with him . sounds like he could use some . '' emma grimaced as she wiped noah 's face off . `` this is exactly why i told aidan not to try and fix you two up . '' `` what do you mean ? '' `` pesh needs a relationship , not a hook-up after all he 's be...
giving noah a kiss on the cheek , she added , `` neither one of us were really in a good place-i was trying to make sure that aidan really was the one , and after being pressured by family and friends , he was trying to date for the first time after his wife 's death . '' megan crossed her arms over her chest . `` i ge...
his wavy , jet-black hair was cut short , and his dark eyes took in all that ankle was saying . and while she may have been in a church about to stand up as a godmother , she could n't help the ni**les tightening and panties moistening reaction of seeing him . he was all the way across the room , but he had the same ef...
she looked radiant as ever in an emerald suit . noah , however , did n't seem too thrilled to be outfitted in the lacy gown that flowed over emma 's arms and stopped mid-thigh . his tiny brows wrinkled as he waved his fists back and forth as if any moment he might let loose with a scream . taking him by the elbow , aid...
while she possessed a beautiful exterior , she certainly seemed to have a greater depth of character than he had originally expected . he did n't often meet someone like her . most of the women at the hospital who threw themselves at him possessed only surface beauty . he did n't have to be with them very long to perce...
`` please , please , do not scream in there and act like a demon baby . be the angel i know you can be . '' he acknowledged her request by sticking his tongue out and flailing his fists . aidan chuckled at emma 's plea . `` relax , babe . if he feels you getting all tense , he 's going to get fussy . '' emma sighed . `...
`` here godfather , it 's your turn , '' megan said , as she handed noah to him . by now , noah was tired of being held and tired of being ensconced in yards of lace . he peered up at pesh before howling . `` i 'm sorry , little guy , '' he cooed , trying to bounce noah in his arms . as noah continued to cry , pesh loo...
the two of them sat at one of the tables underneath the shade of a massive umbrella . several of her other younger cousins sat around them , playing on their psps and other hand-held devices . `` we 're fine , honey , '' papa replied . `` let me know if he gets to be too much . '' cocking his head , papa demanded , `` ...
and with a wink , he walked off to join emma , leaving megan to wonder why everyone seemed so concerned with hers and pesh 's love lives . as the sunlight started fading , most of the party guests began to trickle out the door . by the time it was dark , it was only a few of aidan and emma 's close friends left . megan...
she jerked her chin over to where aidan cradled a sleeping noah in his arms . as the others talked and laughed around him , aidan stared down at his son with such love in his eyes and adoration on his face that it cut a jagged hole in megan 's chest . her chin trembled as she replied , `` i want that for my son . '' pe...
you think that i 'm a 'refined ' man who drinks wine , would never think of cussing or have inappropriate thoughts , organizes his underwear drawer , and who considers doing the crossword puzzle a fun friday night ? '' megan could n't help snorting at his summation . it was a good distraction not to focus on how he had...
i did n't realize it . i just thought it was the better stuff because it was white tequila . that 's your drink of choice , not mine . '' oh god , she was in so much trouble . she 'd barely consumed any alcohol since she got pregnant and had mason . now she 'd had one regular dosed margarita and almost a full one of st...
`` do you mind ? '' `` go ahead . '' humming along with one of the songs , she laid her head back on the seat . `` i wo n't hurt your ears by singing . '' `` do you not sing ? '' `` oh , i sing , but i do n't do it well . emma 's the one with the voice . '' `` so i 've heard . '' turning to look at him , megan asked , ...
he gripped her face in his hands , holding her captive as his tongue plunged in and out of her mouth . emma had been right-the man could kiss like there was no tomorrow . he knew when to be gentle with his mouth and then when to switch to more demanding , almost conquering kisses . if he could practically make her soak...
she rapidly blinked her blue eyes in disbelief while her cheeks flushed . `` oh god , did you actually just say that ? '' `` i did . '' he gave her a teasing smile . `` and you 'll be calling out my name more than his . '' `` i ... '' she began before she quickly clamped her lips shut . her eyes widened before she scra...
next , he heard the sink water turn on as she brushed her teeth . when it was quiet once again in the bathroom , his feet froze as he stared anxiously at the bathroom door . when it opened , pesh 's breath caught . appearing fresh-faced and clean , megan looked so beautiful as she tentatively stepped into the bedroom ....
it was far too deep to be one of mason 's . panic prickled its way up her skin . where am i ? her eyes frantically scanned the room . overcome by both masculine decor and smells , she realized she was in a man 's bedroom , or more importantly a man 's bed . she had n't woken up this dazed and confused since she got ham...
he raised his brows expectantly at her . `` i 'm ready to go now . '' when she started for the bedroom door , she abruptly stopped . `` wait , my dress ? '' `` i 'll send it out to be dry cleaned . '' `` oh , '' she murmured . in silence , they made their way through the house . megan tried not to be so obvious as she ...
okay ? '' she bobbed her head . `` the same to you . '' with trembling hands , she fumbled for the door handle . when she was finally able to open the door , she stumbled out onto the pavement . as she made her way up the driveway , she could feel pesh 's eyes on her . the car remained parked as she climbed the porch s...
after spending two months trying hard to forget about her infamous night with pesh nadeen , there he was right in front of her . she could n't help having the classic line from casablanca flash in her head , `` out of all the gin joints in all the world , she had to walk into mine . '' she certainly felt that way about...
we 'll always be friends , and i will respect your wishes and your distance . '' for some reason , his words had the opposite effect they should have , and regret ricocheted through her . finally , she managed to say , `` thank you . i appreciate that . '' with a smile , he then turned and walked away . she heaved a pa...
`` somewhere that was romantic with candlelight and soft music-perhaps a place where we could dance in between courses . '' staring at him in surprise , megan replied , `` you 're serious ? '' she slowly shook her head back and forth . `` okay , go on . '' `` once we finished wine and dessert , i would then want to tak...
but on the other hand , if you 're asking if i get nauseous thinking about the fact that emma could have been pregnant with twins , and i would have had three kids under two and in diapers ... '' aidan shuddered . `` then yeah , i get really f**king nauseous , and the room starts to spin a little . '' easing down on hi...
i 'm sure you 'll do just as well with a second and maybe even a third child . '' at the mention of a third child , aidan swallowed hard , his adam 's apple bobbing up and down . `` i do n't mind a third kid ... just not now . maybe in a couple of years . '' he glanced up and smiled at pesh . `` but thanks for the vote...
`` megan has been hurt before , and i do n't think she really knows what it is to be loved . not deeply where her needs were considered . hell , she was only twenty-three when she got knocked up . i want her to find someone who will cherish her , man . i want my girl cared for . '' he patted pesh 's shoulder . `` i thi...
he refused to meet her eye . instead , he gazed over at the wall before holding up one finger to her . `` i meant what i said . i demand to see a male doctor . '' `` yes , but we 're very backed up this afternoon . i 'm not sure how long it will be before you are able to see a doctor , least of all a male doctor . '' w...
at the word , color flooded into pesh 's tan cheeks , and he broke eye contact to momentarily stare down at the floor . his reaction was exactly what megan had feared she would experience in the moment . she had hardly imagined his level of professionalism would allow him to be embarrassed about a medical condition . b...
each time he grimaced , megan imagined that the shot was n't working and the swelling had n't gone down . when pesh entered the room again , he glanced from her to mr. robertson . `` so how are we doing ? '' `` no change . '' he went over to a drawer and searched through it before producing a very large syringe with a ...
`` then i 'll make sure we do n't sit by ourselves . '' i really appreciate that . '' as the car started its decent down , pesh threw his head back and exhaled a long breath . `` well , that was ... '' megan grinned at him . `` the good doctor seems speechless . surely in all your years in the er , you 've seen crazier...
`` you 're forgiven ... for now . '' he took a long swig of his iced tea . `` you did really well back there . '' `` yes , you did . for that to be your first case on your own , you managed to keep yourself together and to give the patient the best level of diagnosis and care you could . '' she could n't help the warmt...
`` i feel the same way sometimes , '' emma replied , as megan stepped through the doorway . as she walked through the foyer and down the hall to the kitchen , mason squirmed to get down . once she set him on his feet , he ran into the living room . that 's where aidan was lounging on the couch with beau on the floor ne...
i 'm starving . '' they were a little behind at the nail salon . '' they pushed through the front door and were quickly seated by the hostess who knew them well . once they eased into a familiar , comfortable booth , they took stock of the menus . `` you have to order alcohol on our behalf since we 're both two knocked...
`` i 'd expect that out of her but not you . '' casey dabbed the corners of her lips with her napkin . `` it 's just a date . i do n't think he 's going to drug you and drag you to a wedding chapel . '' `` i 'd certainly hope not . '' `` so what 's wrong with having an innocent dinner and maybe a movie ? '' `` because ...
as he stepped out of the room , he found himself ambushed by kara , one of the shift nurses . `` hey there . how 's the good doctor doing today ? '' the way she spoke was more of a purr , which was a pretty apt summation since she basically acted like she was a cat in heat anytime he was around . he cringed as she ran ...
as the oldest of his three siblings , he had always felt a responsibility to look out for his two brothers and sister . while arjan and shveta had never given him any trouble , dev , as the spoiled baby of the family , had been a challenge for both pesh and his parents . after experiencing teenage rebellion and a waywa...
but he never made it . instead , megan 's fist cracked into dev 's jaw . the impact did n't take him off his feet , but he did stagger backwards . even as she flailed her wrist back and forth from the obvious pain , megan still managed to bellow , `` get the hell out of here . now . '' dev stared at her in shock as he ...
it 's one thing for you to be so good-looking and a smart doctor , but then when you add in the fact of how sweet , caring , and compassionate you are , it 's like you 're a triple threat . '' she turned to throw the cotton ball into the trash can . his heartbeat thrummed louder and louder at her words while he sat unb...
immediately , her entire body switched gears as she prepared herself for what she might face . `` female , thirty , car accident , '' the paramedic began before rattling off her vitals and other information . after megan had absorbed the information , she turned to the patient . `` hi , i 'm megan . i 'm going to get y...
her head lolled to the side just as the alarms on the monitors began screeching in megan 's ears . `` dammit , she 's crashing ! '' pesh cried . ice-cold fear pricked its way from the top of megan 's head all the way down her body . a patient was crashing in the elevator without the crash cart . what the hell were they...
`` whenever he has a really bad day about his wife- '' she sucked in a breath when she realized she might have said too much . at the thought of pesh 's grief , megan 's chest tightened in agony . he was too good of a man to have to suffer like he did . `` so he goes up to the roof ? '' megan finished for kristi . `` h...
and after we 'd been married for three years , we decided it was time to have a baby . '' when pesh remained silent , megan tentatively asked , `` did she die in childbirth ? '' `` no , we never got that far . we tried for over a year to get pregnant on our own , and it did n't happen . so we were recommended to a fert...
he brought his hands up to cup her face while her arms went around his chest , pulling him closer to her . drops of rain pelted her head and ran down her cheeks while pesh 's white coat grew moist as she ran her hands up and down his back . she realized , in a dizzying flurry , that no man had ever kissed her like this...
`` you 're drenched . '' `` it 's raining outside . '' `` so i 've heard , '' she said knowingly . `` what does that mean ? '' she waved her hand . why do n't you do us both a favor and go get out of those wet clothes ? the last thing we need is you coming down with something . '' pesh knew it was fruitless to argue wi...
End of preview. Expand in Data Studio

Dataset Card for "bookcorpus_compact_1024"

Num samples: 616,051

The number of tokens for each sequence is not exactly 1024, but all slightly shorter than 1024. The sequences were built by merging sentences to the maximal length shorter than 1024 tokens. Therefore, padding is necessary for batch processing.

import time
from typing import List

from datasets import load_dataset, Dataset
from tqdm import tqdm
from transformers import AutoTokenizer


def batch_tokenize(texts: List[str], tokenizer, batch_size=1000):
    start = time.time()
    """Tokenize the texts in batch"""
    assert tokenizer.is_fast, "tokenizer must be fast tokenizer"
    tokenized_texts = []
    for i in tqdm(range(0, len(texts), batch_size)):
        batch = texts[i:i + batch_size]
        batch_encoding = tokenizer(batch)
        tokenized_texts.extend(batch_encoding["input_ids"])
    print(f"batch_tokenize time with bs={batch_size}: {time.time() - start}")
    return tokenized_texts


class CompactText:
    def __init__(self, tokenizer="gpt2", split="test", block_size=512):

        self.block_size = block_size
        self.tokenizer = AutoTokenizer.from_pretrained(tokenizer)

    def compact_load(self, dataset_name: str, split: str):
        dataset = load_dataset(dataset_name)[split]

        batch_encoding = batch_tokenize(dataset["text"], self.tokenizer, batch_size=10000)
        compact_texts = []
        texts = dataset["text"]

        total_num_tok = 0
        tracker = []
        i = 0
        for j in tqdm(range(len(batch_encoding))):
            total_num_tok += len(batch_encoding[j])
            if total_num_tok >= self.block_size:
                batch_sents = texts[i:j]
                big_sent = " ".join(batch_sents)
                compact_texts.append(big_sent)
                tracker.append((i, j))
                i = j
                total_num_tok = 0
                print(tracker)
        # self.examples = compact_texts
        compact_ds = Dataset.from_dict({"text": compact_texts})
        return compact_ds


if __name__ == '__main__':
    import argparse

    parser = argparse.ArgumentParser()
    parser.add_argument("-b", "--block-size", type=int, default=512)
    args = parser.parse_args()
    compactifier = CompactText(block_size=args.block_size)
    dataset = compactifier.compact_load(dataset_name="saibo/bookcorpus_deduplicated", split="train")
    dataset.push_to_hub(f"saibo/bookcorpus_compact_{args.block_size}")

More Information needed

Downloads last month
58