ApuVerse / README.md
protibimbo's picture
Upload folder using huggingface_hub
3b8c812 verified
|
Raw
History Blame Contribute Delete
11.2 kB
metadata
language:
  - bn
license: cc0-1.0
pretty_name: ApuVerse  Bibhutibhushan Bandyopadhyay Bengali Literary Corpus
task_categories:
  - text-generation
size_categories:
  - n<1K
tags:
  - bengali
  - bangla
  - literature
  - ocr
  - public-domain
  - continued-pretraining
  - style-transfer
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*.parquet

ApuVerse — Bibhutibhushan Bandyopadhyay Bengali Literary Corpus

Long-form Bengali prose by Bibhutibhushan Bandyopadhyay (1894-1950): the Apu novels (Pather Panchali, Aparajito), Aranyak, Adarsha Hindu Hotel, Ashani Sanket, and seventeen short stories. Extracted from Internet Archive scans of mid-century printed editions, segmented into chapters and stories, and shipped with the OCR confidence scores that produced each record so consumers can filter to the quality level their use case needs.

At a glance

records 104
works 22 (5 long-form, 17 short stories)
characters 2,641,429
words 433,867
tokens (est.) 841,352
language bn (Beng)
author বিভূতিভূষণ বন্দ্যোপাধ্যায়
first published 1929–1959
editions scanned 1960–1964
mean OCR confidence 78.6 / 100
licence cc0-1.0

Each record is one chapter of a novel or one complete short story, so records carry whole narrative arcs rather than fragments.

Text is uncorrected OCR. Rather than silently shipping the errors, every record carries the OCR confidence scores that produced it, so you can filter to whatever quality level your use case needs — see Filtering by quality below.

Contents

Long-form works

work title (en) first published edition chapters chars tokens mean conf
অপরাজিত Aparajito 1932 1961 40 931,943 294,890 77.9
পথের পাঁচালী Pather Panchali 1929 1961 31 490,549 159,850 77.8
আরণ্যক Aranyak 1939 1964 14 385,928 114,782 84.7
আদর্শ হিন্দু হোটেল Adarsha Hindu Hotel 1940 1960 1 302,710 101,432 72.1
অশনি সংকেত Ashani Sanket 1959 1964 1 174,757 55,980 77.0

Short stories

One record each; collection_bn / collection_en name the volume they were printed in.

work title (en) first published edition records chars tokens mean conf
মেঘ-মল্লার Megh-Mallar 1964 1 35,633 10,858 77.5
মৌরীফুল Mourifool 1964 1 34,250 11,303 76.2
দ্রবময়ীর কাশীবাস Drabamayeer Kashibas 1964 1 32,165 10,891 77.2
তারানাথ তান্ত্রিকের গল্প Taranath Tantriker Galpo 1964 1 30,563 9,563 78.5
কিন্নর দল Kinnar Dal 1964 1 28,059 8,885 79.0
পুঁই মাচা Pui Macha 1964 1 24,812 8,292 75.5
ননুমামা ও আমি Nonumama O Ami 1964 1 22,019 7,137 77.7
ক্যানভাসার কৃষ্ণলাল Canvasser Krishnalal 1964 1 21,641 7,118 76.2
নাস্তিক Nastik 1964 1 20,958 6,651 75.2
ভগ্গুলমামার বাড়ী Bhagtulmamar Bari 1964 1 20,382 6,421 79.8
আহ্বান Ahoban 1964 1 16,476 5,305 77.7
সিঁদুরচরণ Sindurcharan 1964 1 16,154 5,363 76.8
একটি ভ্রমণ-কাহিনী Ekti Bhraman-Kahini 1964 1 14,088 4,441 78.3
কনে দেখা Kone Dekha 1964 1 12,543 3,908 77.9
বিপদ Bipad 1964 1 11,879 3,904 77.7
কুশল পাহাড়ী Kushal Pahari 1964 1 10,311 3,256 75.8
তুচ্ছ Tuchcha 1964 1 3,609 1,122 77.3

Record size distribution

chars
smallest 3,609
median 18,658
90th percentile 35,633
largest 302,710

Sources

Every record traces back to a scanned printed edition on the Internet Archive.

source PDF Internet Archive item pages works status
Aaranyak.pdf in.ernet.dli.2015.453018 200 1 ready
Adarsha-Hindu-hotel.pdf in.ernet.dli.2015.457479 208 1 ready
Ashani-sanket.pdf in.ernet.dli.2015.457448 100 1 ready
Aparajita.pdf in.ernet.dli.2015.455079 818 2 ready
Chotogolpo.pdf in.ernet.dli.2015.456545 204 17 ready
Arogya-Niketan.pdf in.ernet.dli.2015.316173 414 0 excluded

Excluded sources

Kept in the manifest rather than deleted, so the reason stays on the record:

  • Arogya-Niketan.pdf (excluded) — NOT Bibhutibhushan. This is আরোগ্য নিকেতন (1953) by Tarashankar Bandyopadhyay — the scan's own text names জীবন মশাই, its protagonist. The Internet Archive/DLI record miscredits it to 'Bandyopadhyay, Bibhutibhushan'; the two authors share a surname. Excluded so the corpus stays single-author and the style signal stays clean.

Schema

column type meaning
text string the training field: NFC Bengali prose, paragraphs split by \n\n
id string stable record id, <dataset>/<work>/<unit>
work_bn / work_en / work_id string the work this record belongs to
collection_bn / collection_en string set for stories in a collection, else null
unit_type string chapter or story
unit_index int32 position within the work
n_chars / n_words / n_tokens_est int32 size; n_tokens_est is null if no tokenizer was configured
first_published / edition_year int32 year of the work vs. of the scanned printing
ia_identifier / source_url / source_pdf string provenance
ocr_engine / ocr_params / ocr_source string how the text was produced
conf_mean float32 mean OCR word confidence (0-100), null if unknown
conf_p10 float32 10th-percentile page confidence — catches local damage a mean hides
low_conf_word_frac float32 fraction of words scored below 70
pages list<struct> per source page: page_index, printed_page, char_start, char_end, conf_mean, low_conf_word_frac

conf_* columns are null, never 0.0, when confidence is genuinely unknown — a fabricated zero would read as worst-possible quality and silently drop good text.

Filtering by quality

from datasets import load_dataset

ds = load_dataset("<repo>", split="train")

# 1. drop whole records that are mostly noise
good = ds.filter(lambda r: (r["conf_mean"] or 0) >= 75.0)

# 2. or excise only the bad pages, keeping the rest of the chapter
def drop_bad_pages(rec, floor=70.0):
    keep = [rec["text"][p["char_start"]:p["char_end"]]
            for p in rec["pages"] if (p["conf_mean"] or 0) >= floor]
    return {"text": "".join(keep)}

clean = ds.map(drop_bad_pages)

The pages spans are contiguous and tile text exactly, so slicing and rejoining them never loses or duplicates characters.

Intended use

Continued pretraining and LoRA/PEFT style tuning on next-token prediction — the records are raw prose, not instruction pairs. Text is not pre-chunked to a token window: packing to 2048/4096 with an EOS at document boundaries is a training-time decision, and pre-chunking would sever sentences and take that choice away. n_tokens_est is provided so you can plan packing without tokenizing first.

There is a single train split. For style evaluation, hold out a work yourself (filtering on work_id) so the held-out text is genuinely unseen.

# hold out one novel for evaluation
train = ds.filter(lambda r: r["work_id"] != "aranyak")
eval_ = ds.filter(lambda r: r["work_id"] == "aranyak")

How the text was produced

  1. Extract — text and per-word confidence are read from the Internet Archive hOCR derivative of each scan. The PDF's own invisible text layer carries the same characters but no confidence, so hOCR is preferred wherever an item exists.
  2. Normalise — Unicode NFC. Zero-width joiners are preserved: in Bengali they carry the reph / ya-phala distinction, so stripping them would change words.
  3. Strip page furniture — running headers and page numbers are removed. The same running title is OCR'd differently on nearly every page, so headers are detected by fuzzy-clustering candidate lines rather than by exact match.
  4. Reflow — printed line breaks are rejoined into paragraphs, including across page boundaries. Paragraphs are separated by \n\n.
  5. Segment — split into works by verified page ranges, then into chapters by printed headings.

Limitations

  • OCR is uncorrected (tesseract 5.0.0-alpha-20201231-10-g1236). Mean record confidence is 78.6/100, and 2 of 104 records fall below 75. Expect wrong conjuncts, stray Latin characters and mangled punctuation. The text is good enough to learn style and syntax from, and not a reliable edition to quote from.
  • Front matter, editorial prefaces and critical appendices were excluded by page range, but header and page-number removal is heuristic and a few survive mid-text.
  • Paragraph boundaries are reconstructed from printed line breaks and are approximate; dialogue segments more reliably than continuous narration.
  • Chapter splits come from printed headings. Books whose headings did not survive OCR appear as a single long record rather than being split arbitrarily.
  • Scans are of mid-century reprints, not first editions, so spelling reflects the printing house's conventions of the day.
  • Single author and single genre: this is literary prose from one writer, and is not a general-purpose Bengali corpus.

Provenance and rights

Scans and OCR come from the Internet Archive; see ia_identifier and source_url on each record, and the Sources table above.

Cataloguing note: Internet Archive/DLI author fields for this collection are not always reliable. Attribution here was checked against each scan's own title page, not taken from the metadata record.

The author died in 1950, so these works are public domain in India (life + 60, expired 2011). US status is not automatic: works published 1929 or later by a foreign author may have had US copyright restored under the URAA, which would cover Aranyak (1939) and Adarsha Hindu Hotel (1940). Confirm before publishing this dataset publicly.