NaNoGenMo / 2017

National Novel Generation Month, 2017 edition.
https://nanogenmo.github.io
186 stars 7 forks source link

Detail scrambler #16

Open enkiv2 opened 7 years ago

enkiv2 commented 7 years ago

The plan: take some existing input as a stream, isolate the nouns, take their hypernyms and choose a particular hyponym at random of that hypernym, then memoize that choice so that all later substitutions are consistent.

Lots of people have used wordnet's synonyms, hypernyms, and hyponyms to mutate existing texts, but I don't recall prior entries doing exactly this.

enkiv2 commented 7 years ago

Source: https://github.com/enkiv2/misc/blob/master/nanogenmo-2017/detail-scrambler.py Output: https://github.com/enkiv2/misc/blob/master/nanogenmo-2017/fate-zero-scrambled.txt

(The input here was the text of Fate Zero; I'm not sure the result is even readable to people not familiar with the franchise.)

enkiv2 commented 7 years ago

The output when replacement probability is 1 in 10 is a lot cleaner, while still being strange enough to be an interesting transformation: https://github.com/enkiv2/misc/blob/master/nanogenmo-2017/fate-zero-scrambled-3.txt