Datasets:

Modalities:
Text
Formats:
json
Size:
< 1K
Libraries:
Datasets
pandas
License:
Dataset Viewer
Auto-converted to Parquet Duplicate
book_title
stringlengths
7
57
language
stringclasses
3 values
chapters
list
World History Volume 1, to 1500
en
[ { "title": "Preface", "abstract": null, "sections": [ { "title": "About OpenStax", "paragraph": "OpenStax is part of Rice University, which is a 501(c)(3) nonprofit charitable corporation. As an educational initiative, it's our mission to improve educational access and learning for...
World History Volume 2, from 1400
en
[{"title":"Preface","abstract":null,"sections":[{"title":"About OpenStax","paragraph":"OpenStax is p(...TRUNCATED)
Workplace Software and Skills
en
[{"title":"Preface","abstract":null,"sections":[{"title":"About OpenStax","paragraph":"OpenStax is p(...TRUNCATED)
Makroekonomia - Podstawy
pl
[{"title":"Przedmowa","abstract":null,"sections":[{"title":"O podręczniku *Makroekonomia – podsta(...TRUNCATED)
Organic Chemistry
en
[{"title":"Dedication and Preface","abstract":null,"sections":[{"title":"About OpenStax","paragraph"(...TRUNCATED)
Contemporary Mathematics
en
[{"title":"Preface","abstract":null,"sections":[{"title":"About OpenStax","paragraph":"OpenStax is p(...TRUNCATED)
Principles of Marketing
en
[{"title":"Preface","abstract":null,"sections":[{"title":"About OpenStax","paragraph":"OpenStax is p(...TRUNCATED)
Introduction to Philosophy
en
[{"title":"Preface","abstract":null,"sections":[{"title":"About OpenStax","paragraph":"OpenStax is p(...TRUNCATED)
Introduction to Political Science
en
[{"title":"Preface","abstract":null,"sections":[{"title":"About OpenStax","paragraph":"OpenStax is p(...TRUNCATED)
Química 2ed
es
[{"title":"Prefacio","abstract":"","sections":[{"title":"Acerca de OpenStax","paragraph":"OpenStax e(...TRUNCATED)
End of preview. Expand in Data Studio

Texbooks from openstax.org with their chapters, abstracts and sections.

Sample:

{
   "book_title":"World History Volume 1, to 1500",
   "language":"en",
   "chapters":[
      {
         "title":"Preface",
         "abstract":"None",
         "sections":[
            {
               "title":"About OpenStax",
               "paragraph":"OpenStax is part of Rice University, which is a 501(c)(3) nonprofit..."
            },
            {
               "title":"About OpenStax Resources",
               "paragraph":"None"
            },
            {
               "title":"About *World History*",
               "paragraph":"*World History* is designed to support both semesters of the world history course..."
            },
            {
               "title":"Pedagogical Foundation",
               "paragraph":"None"
            },
            {
               "title":"Answers to Questions in the Book",
               "paragraph":"The end-of-chapter Review, Check Your Understanding, and Reflection Questions are intended for..."
            },

Stats:

def count_sections(chapters):
    for chapter in chapters:
        if "sections" in chapter:
            n_titles = sum(1 for s in chapter["sections"] if s["title"] is not None and s["title"].strip())
            n_paras = sum(1 for s in chapter["sections"] if s["paragraph"] is not None and s["paragraph"].strip())
            yield n_titles, n_paras
        else:
            yield from count_sections(chapter["chapters"])

with open('openstax_books.jsonl') as fin:
    total_books = 0
    total_titles, total_paras = 0, 0
    for line in fin:
        book = json.loads(line)
        if book["language"] != "en":
            continue
        total_books += 1
        for t, p in count_sections(book["chapters"]):
            total_titles += t
            total_paras += p

total_books, total_titles, total_paras
(60, 16771, 16165)
Downloads last month
91