NCTB-SchoolText-EN: A Curriculum-Aligned English Text Corpus from the Official English-Medium School Textbooks of Bangladesh (Classes 1–10)

Published: 6 September 2026| Version 1 | DOI: 10.17632/xwr5vy66nb.1
Contributors:
,
,

Description

NCTB-SchoolText-EN is a passage-level English text corpus extracted from the official English-medium editions of the general-curriculum textbooks published by the National Curriculum and Textbook Board (NCTB) of Bangladesh, covering Classes 1 through 10. The dataset contains 50,502 passage chunks drawn from 800 chapters across 86 books, 25 distinct subjects and nine grade levels (Classes 1-8 individually, and Classes 9-10 combined as the SSC book set), stored in a uniform JSON Lines (JSONL) schema. Each record reports the grade, subject, language, chapter number, chapter title, a deterministic chunk identifier, and the cleaned passage text, allowing any chunk to be traced back to its exact position in the curriculum. Every book in this release is one that NCTB itself publishes in English, so the text is the board's own official English wording rather than a translation. The source materials are scanned, image-based PDFs. Because direct text extraction from these files is unreliable, the corpus was built using optical character recognition (Tesseract, via pytesseract) with the English language model, followed by chapter mapping from per-book configuration files and cleaning to remove scanning artefacts (headers, footers, page numbers) while preserving punctuation and question/list structure. Text is then segmented into short, pedagogically coherent chunks (median length 356 characters) that keep activities, questions, and expository passages intact rather than splitting them mid-unit. All 13,042 source pages were successfully processed, with a residual OCR garbage rate of 0.7%. The corpus is monolingual English throughout: every one of the 50,502 records was checked to contain no Bengali script. It is intended as a machine-readable, curriculum-aligned foundation for educational NLP applications such as retrieval-augmented tutoring systems, curriculum-grounded question answering, comprehension-set generation, and language modelling research on school-level educational text. Only processed text chunks and chapter-mapping configuration files are released; raw NCTB PDF scans are not redistributed for copyright reasons.

Files

Steps to reproduce

1. Obtain source PDFs. The official NCTB English-edition textbook PDFs are not redistributed with this dataset for copyright reasons. The book catalogue (english_editions.json) lists every title with its NCTB download link; download_english.py fetches them from NCTB's egovcloud mirror into dataset/dataset_en/OCRed/<classFolder>/ and records what it retrieved in manifest_english.json. The English editions are separate NCTB publications, not translations of the Bangla PDFs, and 61 of the 86 books differ from the Bangla edition in page count. 2. Install dependencies. Python 3 with pdf2image, pytesseract and Pillow; the Tesseract OCR engine (CLI) with the English (eng) language pack; and the Poppler utilities, which pdf2image requires to rasterize PDF pages to images. 3. OCR every page: python3 ocr_english.py <workers>, optionally followed by one or more class folders to limit the run. Pages are OCR'd with -l eng and cached one text file per page under _ocrcache_en/, so the step is resumable and can be re-entered after an interruption without redoing completed pages. All 13,042 pages across the 86 books complete. 4. Detect chapter boundaries: python3 detect_english.py --write. Because the English editions carry their own pagination, the Bangla chapter configuration cannot be reused. Three independent signals are combined per book: the chapter count from the Bangla configuration as a prior, the chapter count parsed from the English Contents page, and "Chapter N" openers located in the body text. Only the body scan yields PDF page indices, so it acts as the detector while the other two score it; where the signals disagree the disagreement is reported rather than silently reconciled, because the English edition is sometimes genuinely different (Class 9-10 Physics has 13 chapters in English against 12 in Bangla). This writes chapters_config_<subject>.json for each book. 5. Extract and chunk: python3 process_english.py, optionally followed by class folders. This reads the configuration written in step 4, cleans the OCR text to remove scanning artefacts (headers, footers, page numbers) while preserving punctuation and question/list structure, segments it on paragraph boundaries into chunks of roughly 400 characters that keep activities, questions and expository passages intact, and writes processed_chapters_<subject>/*.jsonl. Every record carries lang="en". 6. Determinism. Each chunk_id is generated as class-subject-chapter_no-chunk_index, so re-running the pipeline on the same source PDFs and configuration files reproduces byte-identical chunk text and identifiers.

Institutions

Categories

Education, Information Retrieval, Educational Technology, Natural Language Processing, Corpus Linguistics

Licence