Trim trailing schwas in multisyllabic rhyme keys

militia (IH-AH) now catches commissioner (IH-AH-ER) — a trailing
reduced syllable falls off the beat. Phrase distinctness is checked by
anchor word so "fire burns" can't pose as a rhyme partner for "fire".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-07 01:19:02 -04:00
parent 7a1e0e2953
commit 99ff44ca0e
2 changed files with 17 additions and 4 deletions
+7
View File
@@ -215,3 +215,10 @@ def test_syllables_always_reported():
m = meter_of("the city hums in amber under fading light")
assert m["syl"] == 12
assert m["stress"]
def test_trailing_schwa_trimmed_militia_commissioner():
# commissioner has one extra reduced syllable (IH-AH-ER vs IH-AH)
text = ("Swagger down pat, call my shit Patricia\n"
"Young Money militia, and I am the commissioner")
group_with(text, "patricia", "militia", "commissioner")