Metadata-Version: 2.1
Name: poetry-analysis
Version: 0.3.14
Summary: Tool to parse and annotate Norwegian poetry.
Author-Email: Ingerid Dale <ingerid.dale@nb.no>, Ranveig Kvinnsland <ranveig.kvinnsland@ibsen.uio.no>
License: CC-BY-4.0
Project-URL: Repository, https://github.com/norn-uio/poetry-analysis.git
Project-URL: Issues, https://github.com/norn-uio/poetry-analysis/issues
Project-URL: Documentation, https://norn-uio.github.io/poetry-analysis/
Requires-Python: >=3.11
Requires-Dist: nb-tokenizer
Requires-Dist: pandas
Requires-Dist: convert-pa
Requires-Dist: matplotlib
Provides-Extra: docs
Requires-Dist: mkdocs>=1.6.1; extra == "docs"
Requires-Dist: mkdocs-material>=9.6.21; extra == "docs"
Requires-Dist: mkdocstrings>=0.30.1; extra == "docs"
Requires-Dist: mkdocstrings-python>=1.18.2; extra == "docs"
Requires-Dist: pymdown-extensions>=10.16.1; extra == "docs"
Requires-Dist: nbconvert>=7.16.6; extra == "docs"
Requires-Dist: mkdocs-jupyter>=0.25.1; extra == "docs"
Requires-Dist: jupytext; extra == "docs"
Description-Content-Type: text/markdown

# poetry-analysis

[![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fnorn-uio%2Fpoetry-analysis%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)](https://www.python.org/downloads/)
[![PyPI - Version](https://img.shields.io/pypi/v/poetry-analysis)](https://pypi.org/project/poetry-analysis/)
[![License](https://img.shields.io/pypi/l/poetry-analysis)](https://creativecommons.org/licenses/by/4.0/deed.en)
[![Github Action tests](https://github.com/norn-uio/poetry-analysis/actions/workflows/check.yml/badge.svg?branch=main&event=push)](https://github.com/norn-uio/poetry-analysis/actions/workflows/check.yml)

- **GitHub repository**: <https://github.com/norn-uio/poetry-analysis/>
- **Documentation**: <https://norn-uio.github.io/poetry-analysis/>

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

`poetry_analysis` has been developed alongside [NORN Poems](https://github.com/norn-uio/norn-poems), a corpus of Norwegian poetry from the 1890's, which is freely available to use with this tool.

## Installation

This library requires python >= 3.11. Create and activate a virtual environment before installing, e.g. with [`uv`](https://docs.astral.sh/uv/):

```shell
# Create environment with uv
uv venv --python 3.11

# Activate environment
source .venv/bin/activate

# Install poetry_analysis
pip install poetry-analysis
```

## Contact

This tool was developed as a collaboration project between a literary scholar and a computational linguist in the [NORN project](https://www.hf.uio.no/iln/english/research/projects/norn-norwegian-romantic-nationalisms/index.html):

- Ranveig Kvinnsland [<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/refs/heads/6.x/svgs/brands/github.svg" width="20" height="20" alt="GitHub icon">](https://github.com/ranveigk)
[<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/envelope.svg" width="20" height="20" alt="Email icon">](mailto:ranveig.kvinnsland@ibsen.uio.no)
- Ingerid Dale [<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/refs/heads/6.x/svgs/brands/github.svg" width="20" height="20" alt="GitHub icon">](https://github.com/ingerid)
[<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/envelope.svg" width="20" height="20" alt="Email icon">](mailto:ingerid.dale@nb.no)

If you discover any bugs, have any questions, or suggestions for improvements, please open an issue and assign an appropriate label to it. Contributions and pull requests are also welcome! Please check out the [contributing](https://github.com/norn-uio/poetry-analysis?tab=contributing-ov-file) section in the repo for guidelines.
