Metadata-Version: 2.4
Name: rhyme-mapper
Version: 0.0.1
Summary: Rhyme Mapper is a tool for visually exploring the phonetic structure and rhyme patterns of text.
Keywords: poetry,rhyme,phonology,text-analysis,computational-linguistics,nlp,visualization,rhyme-detection
Author: Akin Gülfidan
Author-email: Akin Gülfidan <akingulfidan@gmail.com>
License-Expression: AGPL-3.0-or-later
License-File: LICENSE
Requires-Dist: fastapi[standard]>=0.141.1
Requires-Dist: phonemizer>=3.4.0
Maintainer: Akin Gülfidan
Maintainer-email: Akin Gülfidan <akingulfidan@gmail.com>
Requires-Python: >=3.14
Project-URL: Repository, https://github.com/akingulfidan/Rhyme_Mapper
Project-URL: DockerHub, https://hub.docker.com/repository/docker/akingulfidan/rhyme-mapper/general
Description-Content-Type: text/markdown

# Rhyme Mapper

Rhyme Mapper is a tool for visually exploring the phonetic structure and rhyme patterns of text, with a focus on poetry.

![screenshot](assets/readme_photo.png)


The tool generates a phonetic representation of a poem where each phoneme is drawn as a circle. Phoneme size is used to indicate stress, with different sizes representing primary and secondary stress.

Using phoneme sequences, the tool detects chains of rhyming words and represents the chains as paths connecting the drawn phonemes.

Rhyme Mapper supports [127 languages](https://github.com/espeak-ng/espeak-ng/blob/master/docs/languages.md) supported by espeak-ng.

The project is ongoing and still in its early stages.

## Installation

### PyPI

> [!NOTE]
> The PyPI package is not yet available.

### Docker

```sh
# Pull the latest image
docker pull akingulfidan/rhyme-mapper 

# Start the container
docker run -p 8000:8000 akingulfidan/rhyme-mapper:latest 

# Navigate to http://localhost:8000/front
```
## Usage
1. Enter or paste your text.
2. Select the language.
3. Generate the rhyme graph.
4. Use the chain-length slider to filter the displayed rhyme paths.
5. Drag the graph to move it and scroll to zoom.

## Roadmap

### Short Term :

- [ ] Allow selecting phones in the visualization
- [ ] Display information on selected words and phones
- [ ] Line numbers on the text area and the visualization.
- [ ] Better rhyme path filtering tools.
- [ ] Improve documentation.
- [ ] Publish package to PyPI.

### Long Term:

- [ ] Add detection for non-perfect rhymes.
- [ ] Highlight stress patterns in the visualization and display measure.
- [ ] Rhyme Scheme detection.

## Attributions

Phonemization in Rhyme Mapper is done using [Phonemizer](https://github.com/bootphon/phonemizer) library.

```bibtex
@article{Bernard2021,
doi = {10.21105/joss.03958},
url = {https://doi.org/10.21105/joss.03958},
year = {2021},
publisher = {The Open Journal},
volume = {6},
number = {68},
pages = {3958},
author = {Mathieu Bernard and Hadrien Titeux},
title = {Phonemizer: Text to Phones Transcription for Multiple Languages in Python},
journal = {Journal of Open Source Software}
}
```
## License

[GNU Affero General Public License v3.0](LICENSE)