Skip to content

poetry-analysis

Release

Rule-based tool to extract repetition patterns and other lyric features from poetry, or other text data where the newline is a meaningful segment boundary.

Lyric features that can be extracted with this tool includes

  • end rhyme schemes
  • alliteration
  • anaphora
  • lyrical subject

This tool was developed for the NORN project.

It was developed alongside NORN Poems, a corpus of Norwegian poetry from the 1890's, which is freely available as TEI .xml and plain .txt files.

Installation

This library requires python >= 3.11. Create and activate a virtual environment before installing, e.g. with uv:

# Create environment with uv
uv venv --python 3.11

# Activate environment
source .venv/bin/activate

# Install poetry_analysis
pip install poetry-analysis