classics icon

Classics Python Library

From the CORGIS Dataset Project

By Austin Cory Bart acbart@vt.edu
Version 2.0.0, created 4/2/2016
Tags: classics, books, texts, text, book, classic, english, shakespeare, literature, novel, language, composition, writing, author, publication, words

Overview

Project Gutenberg (PG) is a volunteer effort to digitize and archive cultural works, to ‘encourage the creation and distribution of eBooks’. It was founded in 1971 by Michael S. Hart and is the oldest digital library. This dataset is a collection of the top 1000 most popular books on Project Gutenberg, as determined by downloads. Each book has information about its authorship, publication date, congressional classication, and a few other fields. It also has some simple, computed statistics based on common metrics such as sentiment analysis, Flesch Kincaid Reading level, and average sentence length.

https://www.gutenberg.org/ebooks/search/?sort_order=downloads

Explore Structure

Each row represents $MISSING_FIELD.

Index Type Example Value
0 dict { }
1 dict (same structure)
2 dict (same structure)
... ... ...
Key Type Example Value Description
"bibliography" dict { }
"metadata" dict { }
"metrics" dict { }
Key Type Example Value Description
"congress classifications" str "PR" $MISSING_FIELD
"languages" str "en" $MISSING_FIELD
"subjects" str "Sisters -- Fiction,Courtship -- Fiction,Social classes -- Fiction,England -- Fiction,Domestic fiction,Young women -- Fiction,Love stories" $MISSING_FIELD
"title" str "Pride and Prejudice" $MISSING_FIELD
"type" str "Text" $MISSING_FIELD
"author" dict { }
"publication" dict { }
Key Type Example Value Description
"downloads" int 36576 The number of times this book has been downloaded from Project Gutenberg, as of the last update (circa Spring 2016).
"id" int 1342 Every book on Project Gutenberg has a unique ID number. You can use this number to check the book on project gutenberg (e.g., book 110 is http://www.gutenberg.org/ebooks/110).
"rank" int 1 The rank of this book in comparison to other books on Gutenberg, measured by number of downloads. A lower rank indicatest that that book is more popular.
"url" str "https://www.gutenberg.org/ebooks/1342" $MISSING_FIELD
"formats" dict { }
Key Type Example Value Description
"birth" int 1775 The recorded birth year of the author. If their birth year is unknown, it is replaced with "0".
"death" int 1817 The recorded year of the author's death. If their death year is unknown, it is replaced with "0".
"name" str "Austen, Jane" $MISSING_FIELD
Key Type Example Value Description
"day" int 1 The day of the month when the book was published. Notice that missing values have been coded as "0".
"full" str "June, 1998" $MISSING_FIELD
"month" int 6 The month of the year when the book was published; 1 corresponds to January, 2 to February, etc. Notice that missing values have been coded as "0".
"month name" str "June" $MISSING_FIELD
"year" int 1998 The year when the book was published according to Project Gutenberg. Keep in mind that this may not be the original publication date of the work, just that particular edition of the work. Notice that missing values have been coded as "0".
Key Type Example Value Description
"total" int 8 Project Gutenberg makes books available in a wide variety of file formats, including raw text files, HTML web pages, audio books, etc. This field indicates the number of ways that this book is available.
"types" str "text/plain,text/plain; charset=us-ascii,application/pdf,application/x-mobipocket-ebook,application/zip,application/rdf+xml,application/epub+zip,text/html; charset=us-ascii" $MISSING_FIELD
Key Type Example Value Description
"difficulty" dict { }
"sentiments" dict { }
"statistics" dict { }
Key Type Example Value Description
"automated readability index" float 10.7 The Automated Readability Index is a number indicating the understandability of the text. This number is an approximate US Grade Level needed to comprehend the text, calculated using the characters per word and words per sentences.
"coleman liau index" float 10.73 The Coleman Liau Index is a number indicating the understandability of the text. This number is an approximate US Grade Level needed to comprehend the text, calculated using characters instead of syllables, similar to the Automated Readability Index.
"dale chall readability score" float 5.7 The Dale Chall Readability Score provides a numeric gauge of the comprehension difficulty that readers come upon when reading a text. It uses a list of 3000 words that groups of fourth-grade American students could reliably understand, considering any word not on that list to be difficult. This number is an approximate US Grade Level needed to comprehend the text.
"difficult words" int 9032 The number of words in the text that are considered "difficult"; that is, they are not on a list of 3000 words that are considered understandable by fourth-grade American students.
"flesch kincaid grade" float 7.9 The "Flesch-Kincaid Grade Level Formula" presents a score as a U.S. grade level, making it easier to understand. It uses a similar formula to the Flesch Reading Ease measure.
"flesch reading ease" float 70.13 The 'Flesch Reading Ease' uses the sentence length (number of words per sentence) and the number of syllables per word in an equation to calculate the reading ease. Texts with a very high Flesch reading Ease score (about 100) are very easy to read, have short sentences and no words of more than two syllables.
"gunning fog" float 9.200000000000001 The Gunning Fog Index measures the readability of English writing. The index estimates the years of formal education needed to understand the text on a first reading. The formula is calculated using the ratio of words to sentences and the percentage of words that are complex (i.e. have three or more syllables).
"linsear write formula" float 13.5 Linsear Write is a readability metric for English text, purportedly developed for the United States Air Force to help them calculate the readability of their technical manuals. It was designed to calculate the United States grade level of a text sample based on sentence length and the number words used that have three or more syllables.
"smog index" float 3.1 The SMOG grade is a measure of readability that estimates the years of education needed to understand a piece of writing. SMOG is the acronym derived from "Simple Measure of Gobbledygook". Its formula is based on the number of polysyllables (words with three or more syllables) and the number of sentences.
Key Type Example Value Description
"polarity" float 0.13671337760500446 Sentiment analysis attempts to determine the attitude of a speaker or a writer with respect to some topic or the overall contextual polarity of a document. Polarity in particular refers to how positive or negative the author is towards the content.
"subjectivity" float 0.5222391494704692 Sentiment analysis attempts to determine the attitude of a speaker or a writer with respect to some topic or the overall contextual polarity of a document. Subjectivity (as opposed to Objectivity) in particular refers to whether the text is opinionated or attempts to stay factual.
Key Type Example Value Description
"average letter per word" float 4.83 $MISSING_FIELD
"average sentence length" float 18.0 $MISSING_FIELD
"average sentence per word" float 0.05 $MISSING_FIELD
"characters" int 586794 Characters are letters and symbols in a text, not the number of people.
"polysyllables" int 4603 The number of words that have 3 or more syllables.
"sentences" int 6511 $MISSING_FIELD
"syllables" float 170648.1 $MISSING_FIELD
"words" int 121533 $MISSING_FIELD

Downloads

Download all of the following files.

  1. classics.py
  2. classics.data

Usage

import classics
book = classics.get_book()

Documentation

get_book()
Returns a list of dictionaries representing Book.