Generate a pseudo-poem that would contain 160 bits of recoverable information [closed]
Asked Answered
C

2

10

I have 160 bits of random data.

Just for fun, I want to generate an English pseudo-poem to "store" this information in. I want to be able to recover this information from the poem. ("Poem" here is a vague term for any kind of poetry.)

Note: This is not a security question, I don't care if someone else will be able to recover the information or even detect that it is there or not.

Criteria for a better poem:

  • Better aestetics
  • Better rhyme and foot
  • Uniqueness
  • Shorter length

I'd say that the acceptable poem is no longer than three stanzas of four lines each. (But the other, established forms of poetry, like sonnets are good as well.)

I like this idea, but, I'm afraid, that I'm completely clueless in how to do English computer-generated poetry. (I programmed that for Russian when I was young, but looks like that experience will not help me here.)

So, any clues?

Note: I already asked a similar question. I want to try both approaches. Note how good poem criteria are different from the good phrase in parallel question. Remember, this is "just for fun".

Also, I have to note this: There is an RFC 1605 on somewhat related matters. But it do not suggest any implementation details, so it is not quite useful for me, sorry. <g>

Centaurus answered 15/1, 2011 at 6:6 Comment(1)
This is one of the strangest questions I've encountered on SO, and I mean that in a good way. I can't help, but I'm looking forward to seeing what people come up with. +1Jewelry
M
2

My naive solution/algorithm:

  1. Write a beautiful 160-word poem
  2. Take out a thesaurus, and find an equivalent word for each word in your poem.
  3. The value each word in your original poem is 0 and the value of the word that you found in the thesaurus is 1
  4. Now, encode your 160 bits into the poem

Done.

Melliemelliferous answered 3/2, 2011 at 22:24 Comment(1)
Hmm... interesting approach! But it is not so simple. For the result to be poem, one should keep rhyme and foot intact. Also I'd like to have more contrast between poems, so one can tell that they are different from the first glance...Centaurus
G
1

First of all, you need to implement a program, which generates 1 valid and acceptable poem based on markov's model of your language.

Then, you modify it this way: Let's leave first word as-is. Starting from the second word, there are lots of variants possible based on markov's model, sorted from highest probability to lowest. Usually you choose the first, or something like random(10) word and display it. Now you take 2-8 bits of your message, and use this word.

On the receiver side you'll have the same model, and you will see which word you've selected at each step out of all possibilities, and will be able to recover your bits of message.

Gonna answered 15/1, 2011 at 6:30 Comment(3)
Right, Markov models. I used similar approach for a related task actually: https://mcmap.net/q/1159305/-generating-a-pseudo-natural-phrase-from-a-big-integer-in-a-reversible-way/6236, but not for poetry. Any clues where can I get enough poetry to build a frequency table?Centaurus
But, from experience, I think that this would lead to too long poems (or too low quality ones — if history window is too short). There will be too few branches to eat up bits fast enough.Centaurus
There is no good way to eat more bits. You can enhance your markov's model based not only on existing text but using all acceptable combinations - but this will be much much tougher task. For poetry I guess there should be some filtering on acceptable words returned by the model.Gonna

© 2022 - 2024 — McMap. All rights reserved.