|
|
|
|
|
by bravura
1976 days ago
|
|
What do you think would be necessary to generate rhyming text with a particular phrasing / rhythm? e.g. in the style of a particular rapper? If you just fine-tune on a corpus of their lyrics, you might miss the underlying poetic constraints. If there were an additional prior (a "poetry / assonance / rhyme" model), what is the easiest way to constrain generation to respect this prior? Thanks! |
|
It uses Markov chains instead of GPT-2, but the approach should work with prompt-based things like GPT-2 also: for lines that are "free" (e.g. no specific word you need to rhyme with), you can generate the line normally -- but for lines you need to rhyme with a specific word, you can just generate last-word-first and generate backwards. For a strictly LTR prompt like GPT-2, you could probably just reverse your corpus word order, generate "reverse" lines with GPT-2 given the previous line + word you need to rhyme with as the prompt, and then reverse it back to "normal" in postprocessing.
[1] https://festivalpeak.com/stylistic-rhyme-bound-poetry-genera...
Some examples of the output of this approach:
[2] https://medium.com/words-of-mimicry/kanye-west-ballade-1-a6f...
[3] https://medium.com/words-of-mimicry/me-you-and-slow-sip-slow...
I'd expect the output to be better with something like GPT-2/3, since Markov chains are so twentieth-century, but I was pretty happy at the output quality even though it often rhymed the same word repeatedly; you could improve it by weighting previously-used words, removing them from the pool of rhyming words, and/or backtracking to previous lines when you find yourself without other words to rhyme.