Phrases don't dangle on an open-vowel stopword tail

"smell like a" was matching "myself why" (EH-AY) because mosaic triples
were never weak-flagged — a trailing article "a" (bare open vowel)
dangles and isn't part of the rhyme. Triples now skip an open-syllable
stopword tail, while closed ones ("mean to it" -> theme music) stay.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-08 18:06:35 -04:00
parent 23cc6434f7
commit 4c99908d79
2 changed files with 12 additions and 0 deletions
+5
View File
@@ -617,6 +617,11 @@ def analyze(draft: Draft):
continue
if a["word"].lower() in refrain:
continue
_pc = phones_for(c["word"])
if (c["word"].lower() in STOPWORDS and _pc
and _pc.split()[-1][-1].isdigit()):
continue # tail is an open-vowel stopword ("smell like A")
# — it dangles; "mean to IT" (closed) still rhymes
pa, pb, pc = (phones_for(a["word"]), phones_for(b["word"]),
phones_for(c["word"]))
if not (pa and pb and pc):
+7
View File
@@ -767,3 +767,10 @@ def test_consonance_only_on_final_syllable():
assert not any({"meticulous", "quick"} <= s for s in bg.values())
# bliss/exist (final-syllable consonance) still works
group_with("bliss whisps in the nights exist", "bliss", "exist")
def test_triple_not_dangling_on_stopword():
# "smell like a" trails into an article; it shouldn't rhyme "myself why"
text = ("should I listen to myself why\n"
"it just don't smell like a")
assert "smell like a" not in highlighted(text)