Open jeffbinder opened 3 years ago
😆
Some time ago—not sure how long ago...
whenever there is a cold, wet Feeling in my nose;
Wow, that took a long time, even with a GPU. I'm way past the deadline, but it's done: Banalified Moby-Dick.
This is realy interesting - I love how making Moby Dick more banal turns Ishma-Frank into a hat knockin' vagabond. Nice one, Jeff!
Such a great idea!
I am using the BERT language model to banalify the text of Moby-Dick—that is, to replace Melville's rich language with sentences that better conform to the model's expectations. I'm employing a set of Python functions I have been developing for a variety of text-generation projects, including experiments with rhyme and meter; my code and some more examples are available here.
The algorithm is as follows:
The result is a text that retains much of the sentence structure and some of the meaning of the original, but that uses more normative language and that sometimes diverges into surreal absurdity. Here, for instance, is the famous opening of Melville's novel:
Here is the banalified opening:
The current version of the function retains the capitalization of the original, which is why it is sometimes wrong.
I also created versions of Hamlet and A Portrait of the Artist as a Young Man. The banalification of the "To be, or not to be" speech is illustrative: