Skip to content

selyaktini/RhymeMap

Repository files navigation

RhymeMapper

RhymeMapper is a Python tool for analyzing rhyme schemes in rap lyrics using phonetic data.
It splits words into syllables, extracts phonetic features (nucleus and coda), and color‑codes rhyming syllables in the terminal output. It also computes statistical metrics (density, diversity, etc.) and generates comparative graphs.

Features

  • Phonetic transcription using g2p_en
  • Syllable splitting with syllabify (fallback heuristic for unknown words)
  • Rhyme signature based on vowel nucleus and consonant coda (slant rhyme support)
  • Terminal output with ANSI colors for rhyming syllables
  • Adjustable minimum occurrence threshold for rhyme groups
  • Batch analysis from CSV files (scripts/generate_stats.py)
  • Statistical visualisations (boxplots, scatter plots, similarity heatmaps) via analysis/
  • Makefile to automate common tasks

Usage

Quick demo:

  • make demo

Generate statistics from a lyrics CSV

IT TAKES A BIT OF TIME !!!!

  • make stats

Produce all graphs (scatter, boxplot, heatmaps)

  • make plots
  • here is some plots: multi vs density average boxplot density multi vs density all similarity_Eminem

Run unit tests:

make test

Dependencies

Python 3.10+

g2p_en, syllabify, pandas, matplotlib, seaborn, numpy, scikit-learn

About

Visualize rhyme schemes in rap lyrics. RhymeMap analyzes phonetic patterns to detect and color-code rhymes, highlighting multisyllabic connections and mapping the structure of your favorite tracks. Built for rap enthusiasts who want to see the architecture behind the words.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors