NaPoGenMo / NaPoGenMo2017

National Poetry Generation Month 2017
13 stars 3 forks source link

Cheating pseudo-entry: literary style transfer #2

Open enkiv2 opened 7 years ago

enkiv2 commented 7 years ago

I wrote something that uses word2vec to add the vectors of corresponding words together. In this way, you can take two poems of identical length and style and produce a poem that is the combination of the two, in a manner similar to encoding with a vingere cipher.

(Source: https://github.com/enkiv2/misc/blob/master/X_except_its_Y.py )

Possible applications:

enkiv2 commented 7 years ago

I did some rotations on nine inch nails lyrics: https://github.com/enkiv2/misc/tree/master/napogenmo2017

Some interesting results. Here's what Head Like a Hole plus a reversed copy of Underneath It All looks like:

God money I'll do anything for you. you hope just you you what we ask me to. thee accept ride act down maintain this wall. God money don't want everything he wants it all.

[Bridge:] no you can't take it surely Americans can't dove we one we can't gather concerning out from sworn one we can't stood concerning no you can't take it only thee can't require only thee toward act

pulled surely our hole. flee serve bring soul. I'd greater von efficient bring we control. head both bipartisan hole. black as your soul. I'd greater von efficient bring we control.

[Chorus:] servant toward one every this shall serve. you're going to get what you deserve. your back concerning carry every anyone serve. you're exposed we find that anyone deserve.

Almighty money's exempt look -- in cure. Yahweh money's our felt -- thoughts afflict divided in pure. God money let's go dancing on the backs of the bruised. surely money's indeed only safely gather

Here's the reverse:

you hope stained thee accept

I can still feel you all I do

surely Americans still dove one we I've gather one we I've stood crucified only thee still require kill my brain pulled surely our flee serve bring I greater von efficient bring numb both bipartisan

I greater von efficient bring all I do it feels like it keeps coming from the inside servant toward one every this shall go servant toward one every this shall hide

your back concerning carry every anyone it multiply the exposed we find that anyone it becomes try to get back to where I'm from Almighty most exempt look -- in ever had Yahweh is our felt -- thoughts afflict

surely feels indeed only safely gather Almighty the structure there is no place I can go there is no way I can hide

Here's what happens when Head Like A Hole gets added to itself shifted back by five lines:

God money I'll do anything for you. God money just tell me what you want me to. neither thee nail bring them without this wall. neither thee don't give succeed one ask it all.

[Bridge:] doubt thee can't bring we doubt thee can't bring we no you can't take that away from me death thee can't take servant concentrated we can't take upright no greater can't require make thee from me

thigh As my hole. black greater her soul. I'd rather die than give you control. head like a hole. mourning serve thee soul. I'd getting sie even surely thee control.

[Chorus:] bow down before the one you serve. you're going that look that this deserve. servant down if confident all this serve. you're getting to bring exciting Congress deserve.

God money's not looking for the cure. God money's not concerned with the sick amongst the pure. God money let's go dancing on the backs of the bruised. God money's not one to choose

Some of the religious language is funny, and probably a result of having the King James Bible as one of the training documents for the word2vec model. The result has both more biblical language and more explicitly political language than the original.

enkiv2 commented 7 years ago

Shifting by 23 lines causes much of Terrible Lie to become a mix of dated internet slang and what looks like... afrikaans or poorly-spelled dutch?

Hell GTFO why are you doing this to me? am hand we Goshen into to what i'm thankful down be? icke hope och seething strengthen our animosity? hey praise och feel thee invite join with great han apology.

Hell GTFO terrible pwnz Queens moocowz terrible lie

Nu whom i really don't know what you mean. meant maek familiar go understood . hearts dreams. Queens speak soul righteousness squeeze all rude mu extreme. Hell GTFO indivisible my Muslim bout mistakes gro loud gro yours seems?

soul pwnz soul nothin whither lie terrible pwnz

don't take yours away toil me. och return knowing undisturbed strengthen on to. don't shape we away with me. i achieve your fathers strengthen on to.

hey God there's rewarded venison and join with hide. och gradually your ignorance, strengthen with pride. i'm achieve everyone hans opportunity world efter cannot despise. Nu everlasting och destroy thee promises, ur seize to lies.

Hell GTFO Queens bout rude my terrible lie

vsharan2002 commented 7 years ago

@enkiv2 Why do you call it a pseudo-entry? It seems pretty legit, and can probably be scaled up for November.

enkiv2 commented 7 years ago

Because I started in march :)

I may do something like it in November, or use it as a component in something else. (I'm thinking maybe to modulate dialogue by personality trait and mood.)

On Thu, Apr 13, 2017 at 8:47 AM kingofthenerdz3 notifications@github.com wrote:

@enkiv2 https://github.com/enkiv2 Why do you call it a pseudo-entry? It seems pretty legit, and can probably be scaled up for November.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NaPoGenMo/NaPoGenMo2017/issues/2#issuecomment-293885545, or mute the thread https://github.com/notifications/unsubscribe-auth/AAd6GQ0m04zWgw8CyX00tjDJJcEFJcvcks5rvhlqgaJpZM4Mpd7u .

enkiv2 commented 7 years ago

I ran limericks from the fortune limerick database through: https://github.com/enkiv2/misc/blob/master/napogenmo2017/limericks.txt

MichaelPaulukonis commented 7 years ago

There are some (poorly OCR'd) books of limericks at the Internet Archive: https://archive.org/details/bookoflimericks00lear (see "related works" at the bottom)