The Distant Reader, the Distant Reader Toolbox, and Study Carrels

The Distant Reader

The Distant Reader is a system designed to address two main problems: information overload and reading at scale. It takes collections of files — anything from a dozen journal articles to hundreds of books — as input, and transforms them into structured datasets called study carrels. These carrels are designed to be read by computers as well as people, meaning the same data set can be analyzed programmatically and browsed manually. The Distant Reader's home page is at https://distantreader.org.

Through the Distant Reader, students, researchers, and scholars can quickly address research questions ranging from the mundane ("How many items are in this corpus?") to the sublime ("What is St. Augustine's definition of love, and how does it compare to Rousseau's?").

The Distant Reader Toolbox

The Distant Reader Toolbox is a companion to the Distant Reader, implemented as a set of Python modules. It can be installed from the command line:

pip install reader-toolbox

Or installed from source via GitHub. Once installed, it exposes a command-line interface called rdr ("reader"), which provides a wide array of sub-commands for building, analyzing, and reporting on study carrels. Key commands include:

Command Purpose
buildCreate a study carrel from files in a directory
infoOutput metadata describing a carrel
bibOutput bibliographic information
concordanceA "poor man's search engine" — locate words in context
tmApply topic modeling
entFilter named entities (people, places, organizations)
posFilter parts-of-speech (nouns, verbs, adjectives, etc.)
wrdFilter statistically computed keywords
searchFull-text query against a carrel
sqlUse SQL queries against the carrel's database
semanticsApply semantic indexing
summarizeSummarize a carrel
readOpen a carrel in a Web browser

The Toolbox can also be imported into Python scripts, allowing users to combine its functionality with other Python modules for custom analysis pipelines. Full documentation is available at https://reader-toolbox.readthedocs.io/.

Study Carrels

Study carrels are the output datasets produced by the Distant Reader and the Toolbox. They are organized as directories containing subdirectories and files, and they are designed to be platform-independent and network-independent — meaning no special software is required to read them, and once saved locally, no Internet connection is needed.

Directory Structure

Each carrel contains two primary content directories:

  1. cache/ — the original documents used to create the carrel
  2. txt/ — plain text versions of the cached content; nearly all analysis is performed against files here

Additional subdirectories contain tab-delimited files of extracted features:

SubdirectoryContents
adr/Email addresses
bib/Bibliographics (authors, titles, dates, etc.)
ent/Named entities (people, organizations, places)
pos/Parts-of-speech (nouns, verbs, adjectives, etc.)
urls/URLs and their domains
wrd/Statistically significant keywords

Although none of these files carry .tsv or .tab extensions, they are all tab-delimited and can be imported into any spreadsheet, database, or programming language.

Two additional subdirectories exist:

Depending on how the carrel was modeled, several files may appear at the root:

FileDescription
index.csvEchoed metadata file (authors, titles, dates, etc.)
index.gmlGraph Modeling Language file for visualizing relationships
index.htmHTML summary of extracted feature characteristics — "start here"
index.jsonJSON version of the bibliographic report
index.rdfRDF-encoded bibliographic data for the Semantic Web
index.tsvRudimentary list of characteristics
index.txtPlain text bibliographic report
index.xmlBrowsable interface to the carrel
index.zipThe entire carrel compressed for sharing/collaboration

Desktop Applications for Working with Carrels

Because carrels are platform-independent, a variety of desktop tools can be used to analyze them:

In Summary

The Distant Reader and its Toolbox take sets of narrative text as input and output study carrels — structured datasets readable by both machines and humans. Study carrels are designed to stand the test of time through their platform and network independence. Users can employ desktop software or the rdr command-line tool to build, search, browse, investigate, and report on carrel content. Extracted features serve as a back-of-the-book index, and they can feed into concordances for closer reading, topic models for theme discovery, and network graphs for relationship visualization. Ultimately, study carrels supplement traditional reading, making researchers more thorough and comprehensive when confronting large volumes of text.