kennethreitz b204c8d9b9 Multis lookup and per-line syllable counts
- Multis: dictionary search by vowel skeleton — single words and
  two-word combos matching the target's run from its stressed anchor
  (charisma -> little/women/business; vacation plans -> information
  back). Perfect rhymes excluded; phrases supported as targets; new
  "multis" row in the rhymes section. Indexes warm at boot.
- Counts toggle: syllables per line in dim digits at the editor's
  right edge, wrap-safe and live; carried into the PNG export.
- Suffix fusion: multi families whose vowel keys are end-aligned
  containments merge (back pocket / rap profit / off it / still in
  office = one Em chain), with trailing schwas stripped before
  comparison; the longest end token now owns the scheme slot.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:23:29 -04:00

RhymePad

A scratchpad for poets & rappers. Write in the pad; rhymes are detected phonetically (CMU Pronouncing Dictionary) and color-coded as you type — end rhymes, internal rhymes, and slant rhymes included. Comes with a rhyme/synonym lookup, draggable stanza reordering, and synthesized beats with adjustable tempo.

Run

$ uv run uvicorn app:app --reload

Then open http://127.0.0.1:8000.

How rhyme detection works

  • Every word is mapped to its CMU phonemes (pronouncing), with lyric-friendly fallbacks (runnin'running, possessives, and a spelling heuristic for made-up words).
  • Perfect rhymes share everything from the last stressed vowel on (tonight / light / flightAY T). These are matched anywhere in a line — that's the internal rhyme detection.
  • Slant rhymes share just the vowel sounds from the last stressed vowel (hold / coal). Applied to line endings that didn't find a perfect match.
  • Same color = same sound. Underline = line-ending rhyme (the stanza's a/b/a/b scheme); soft glow only = internal rhyme.

API

  • POST /api/analyze {"text": "..."} → token spans, rhyme groups, per-stanza schemes, per-line meter
  • GET /api/lookup?word=light&mode=rhyme|near|syn → frequency-ranked rhymes / near rhymes (by syllable count) and WordNet synonyms (by part of speech)

Dictionary definitions in the UI come from the free dictionaryapi.dev; everything else is served locally.

S
Description
No description provided
Readme ISC 351 KiB
Languages
Python 60.2%
HTML 39.4%
Dockerfile 0.4%