生成一首包含 160 位可恢复信息的伪诗
我有 160 位随机数据。
只是为了好玩,我想生成一首英文伪诗来“存储”这些信息。我希望能够从诗中恢复这些信息。 (这里的“诗歌”是任何类型诗歌的模糊术语。)
注意:这不是一个安全问题,我不在乎其他人是否能够恢复该信息甚至检测它是否存在。
一首更好的诗的标准:
- 更好的美学
- 更好的韵律和韵脚
- 独特性
- 更短的长度
我想说可接受的诗不超过三节,每节四行。 (但是其他既定的诗歌形式,比如十四行诗也很好。)
我喜欢这个想法,但是,我担心,我对如何创作英语计算机生成诗歌完全一无所知。 (我年轻时用俄语编写了这个程序,但看起来这段经历对我没有帮助。)
那么,有什么线索吗?
注意:我已经问过类似的问题。我想尝试这两种方法。请注意,好诗的标准与平行问题中的好短语有何不同。请记住,这“只是为了好玩”。
另外,我必须注意这一点:有一个 RFC 1605 关于一些相关问题。但它没有建议任何实现细节,所以它对我来说不太有用,抱歉。
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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我天真的解决方案/算法:
0
,您在同义词库中找到的单词的值为1
Done 中。
My naive solution/algorithm:
0
and the value of the word that you found in the thesaurus is1
Done.
首先,您需要实现一个程序,该程序根据您的语言的马尔可夫模型生成一首有效且可接受的诗歌。
然后,你这样修改它:
让我们保持第一个词不变。从第二个单词开始,根据马尔可夫模型,有很多可能的变体,从最高概率到最低概率排序。通常,您选择第一个或类似 random(10) 的单词并显示它。现在您获取消息的 2-8 位,并使用这个词。
在接收方,您将拥有相同的模型,并且您将看到您在每一步中从所有可能性中选择了哪个单词,并且能够恢复您的消息位。
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.