Type: Package
Title: Tools for Text Analysis of Aesop's Fables
Version: 0.1.0
Description: Provides a tidy text corpus of Aesop's Fables sourced from the Library of Congress, along with analysis-ready datasets for sentiment, emotion, and linguistic analysis of moral storytelling. The package includes both full narrative texts and word-level representations to support exploratory text analysis and teaching workflows.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.3
Depends: R (≥ 4.1.0)
Suggests: dplyr
NeedsCompilation: no
Packaged: 2026-02-08 16:53:56 UTC; davidbrocker
Author: Dave Brocker [aut, cre]
Maintainer: Dave Brocker <davidabrocker@gmail.com>
Repository: CRAN
Date/Publication: 2026-02-11 19:50:12 UTC

aesopR: Text Analysis of Aesop's Fables

Description

aesopR provides a tidy text corpus of Aesop's Fables sourced from the Library of Congress, along with analysis-ready datasets for exploring sentiment, emotion, and linguistic patterns in moral storytelling.

Details

The package is designed for teaching, research, and exploratory text analysis, offering both raw narrative texts and tokenized data structures. It also includes pre-joined sentiment datasets based on widely used lexicons to support reproducible workflows without requiring interactive downloads.

Core features include:

Datasets

Author(s)

Dave Brocker


Aesop's Fables Tokens with AFINN Sentiment Scores

Description

A token-level dataset of Aesop's Fables joined with the AFINN sentiment lexicon. Each row represents a word from a fable that appears in the AFINN lexicon, along with its associated numeric sentiment score.

Usage

data(aesops_afinn)

Format

A tibble with one row per token and sentiment match, containing:

fable_id

Character identifier for the fable

title

Title of the fable

moral

The moral or lesson associated with the fable.

word

Tokenized word from the fable text

value

AFINN sentiment score

Details

The AFINN lexicon assigns integer sentiment values ranging from negative to positive polarity, making this dataset well-suited for aggregated sentiment scoring and comparative analyses across fables.

Source

AFINN sentiment lexicon by Finn Årup Nielsen (2011).

References

Nielsen, F. Å. (2011). *A new ANEW: Evaluation of a word list for sentiment analysis in microblogs*. Proceedings of the ESWC Workshop on Making Sense of Microposts.

See Also

aesops_tokens


Aesop's Fables Tokens with Bing Sentiment Labels

Description

A token-level dataset of Aesop's Fables joined with the Bing Liu sentiment lexicon. Each row represents a word from a fable that appears in the Bing lexicon, labeled with binary sentiment polarity.

Usage

data(aesops_bing)

Format

A tibble with one row per token and sentiment match, containing:

fable_id

Character identifier for the fable

title

Title of the fable

word

Tokenized word from the fable text

sentiment

Binary sentiment label ("positive" or "negative")

Details

The Bing lexicon classifies words as either "positive" or "negative", making this dataset useful for polarity-based sentiment summaries and instructional demonstrations.

Source

Bing Liu sentiment lexicon.

References

Hu, M., & Liu, B. (2004). *Mining and summarizing customer reviews*. Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.

See Also

aesops_tokens


Aesop's Fables Corpus

Description

A dataset containing 147 of Aesop's Fables retrieved from the Library of Congress public domain collection.

A dataset containing 147 of Aesop's Fables retrieved from the Library of Congress public domain collection.

Usage

aesops_fables

aesops_fables

Format

A tibble with 147 rows and the following variables:

fable_id

Character string uniquely identifying the fable (e.g., "001", "075").

title

Title of the fable.

full_text

Full narrative text of the fable.

moral

The moral or lesson associated with the fable.

source_url

URL of the original Library of Congress page.

A tibble with 147 rows and the following variables:

fable_id

Character string uniquely identifying the fable (e.g., "001", "075").

title

Title of the fable.

full_text

Full narrative text of the fable.

moral

The moral or lesson associated with the fable.

source_url

URL of the original Library of Congress page.

Details

Each row represents a single fable and includes metadata, the full narrative text, and the associated moral.

The texts were scraped from https://read.gov/aesop/ and are believed to be in the public domain. Text has been minimally cleaned to preserve original phrasing and narrative structure.

Each row represents a single fable and includes metadata, the full narrative text, and the associated moral.

The texts were scraped from https://read.gov/aesop/ and are believed to be in the public domain. Text has been minimally cleaned to preserve original phrasing and narrative structure.

Source

Library of Congress, “Aesop's Fables”

Library of Congress, “Aesop's Fables”

Examples

aesops_fables

if (requireNamespace("dplyr", quietly = TRUE)) {
  aesops_fables |>
    dplyr::filter(fable_id == "075") |>
    dplyr::select(title, moral)
}

aesops_fables

aesops_fables |>
  dplyr::filter(fable_id == "075") |>
  dplyr::select(title, moral)


Tokenized Aesop's Fables

Description

A tidy token-level dataset derived from aesops_fables, where each row represents a single word token from a fable.

A tidy token-level dataset derived from aesops_fables, where each row represents a single word token from a fable.

Usage

aesops_tokens

aesops_tokens

Format

A tibble with one row per word token and the following variables:

fable_id

Character string identifying the source fable.

word

Lowercase word token extracted from the fable text.

word_count

Total number of words in the source fable.

source_url

URL of the original fable text.

A tibble with one row per word token and the following variables:

fable_id

Character string identifying the source fable.

title

Title of the fable

moral

The moral or lesson associated with the fable.

word

Lowercase word token extracted from the fable text.

Details

This dataset is intended for text analysis tasks such as sentiment analysis, n-gram modeling, and word frequency analysis.

Tokens were generated using tidytext::unnest_tokens(). Stop words have not been removed, allowing users full flexibility in preprocessing decisions.

This dataset is intended for text analysis tasks such as sentiment analysis, n-gram modeling, and word frequency analysis.

Tokens were generated using tidytext::unnest_tokens(). Stop words have not been removed, allowing users full flexibility in preprocessing decisions.

See Also

aesops_fables

aesops_fables

Examples

aesops_tokens

if (requireNamespace("dplyr", quietly = TRUE)) {
  aesops_tokens |>
    dplyr::count(word, sort = TRUE)
}

aesops_tokens

aesops_tokens |>
  dplyr::count(word, sort = TRUE)