2016 icon indicating copy to clipboard operation
2016 copied to clipboard

Entry: Towers in the Land of Smiling Chimeras

Open anjabeth opened this issue 9 years ago • 8 comments

I'm new to this, but excited to try it out!

My idea for now is to do a progressively lipogrammatic novel a la Ella Minnow Pea: so the letters that are "allowed" to be used decrease as the novel goes on. Currently I have a basic outline of how to do this that may change, but here's the general idea:

  • generate a 50K text (using Markov chains at least to begin with), divided into chapters (each chapter will lose an additional letter eventually, but ignore that constraint in this step)
  • go through each chapter to find words that use the forbidden letters. in order,
  1. replace some fraction (yet to be determined) of banned words with synonyms (probably with WordNet), hoping that this leads to increasing vocabulary contrivedness as characters/the narrator try to get around the letter-based constraints.
  2. replace the rest of banned words (either ignored in the first step or things like prepositions, etc that would be hard to find synonyms for) with letters that look/sound similar to banned ones - e.g. Ella Minnow Pea uses "et" instead of "ed" for the past tense - "walket" instead of "walked". This part will probably be the hardest, because I'd like to play with sounds in some places but English vowels don't like to cooperate with that.
  3. black out/redact any words that remain - for which there weren't synonyms or there weren't good letter replacements - ideally the blacked-out portion of the text will increase as the novel goes on.

I imagine I'll have to toy with the ratios and letter replacements above to get something that's a balance of readable and going with the concept. I'm also not totally sure yet what type of texts I want to use to train my Markov model on - I think it'd be fun to do political/spy novels or something like that to play with the redacted elements, but I don't know if I'd be able to find enough text to get a good model.

Possible future improvements, once I get a basic model working:

  • Switch from Markov chains to some kind of neural net for generation of the initial text - I'm not sure about how these work but I'm interested in them, so this might be a good opportunity to try
  • try to improve the quality of the generated text - differentiating beginning from end, keeping consistent characters, things like that
  • look into "invented synonyms" - EMP does stuff like "aeiouy" for "vowel" and "grapheme" for "letter" that WordNet might not have, but that add something to the text.
  • playing around with the presentation/design, maybe adding poem-based epigrams to chapter headings

anjabeth avatar Oct 22 '16 19:10 anjabeth

This sounds great!!

dariusk avatar Oct 23 '16 03:10 dariusk

I think this might be the one I'm most excited about. This sounds great

bcj avatar Oct 27 '16 13:10 bcj

Some gems from toying around with Markov generation, using Pride and Prejudice and Moby Dick because they were convenient:

"I was sure you could not be married all day" "The envelope contained a sheet of blubber." "Hold the steak in one hand, and a still slighter shuffling of women's shoes, and all was soon right again."

Can't wait to see what happens when I get to synonym substitution

anjabeth avatar Nov 01 '16 01:11 anjabeth

Well, I've got a pretty decent corpus of mystery novels that's giving me the tone I want (or at least a good enough approximation - I particularly love the last sentece) - on to synonym substitution!

Also, I think Markov chains are better at using semicolons in writing than I am.

His dinner cost ninety francs; he threw his last hundred-franc note on the table, and sat down at his desk, and rapidly wrote two letters.I have speculated on the chance that Mr. Luker is lying--and you assume again that the Shivering Sand itself smiling at him in astonishment.Perhaps nothing in the world.The one interpretation that I could discover was altered in her pretty summer dress.Penelope resented my merriment, in rather a headlong manner into talk with strangers, without waiting to feel his continued restlessness at night.He was seized with a violent, persistent, tenacious craving for pepper.

anjabeth avatar Nov 02 '16 00:11 anjabeth

Synonym replacement is working! (After a whole lot of fighting with nltk and various encoding errors)

As a celebration, my favorite sentence from the most recent test run:

He firmly repeated his intention to retire in spite of a general disbelief in the existence of any lunar atmosphere at all

anjabeth avatar Nov 17 '16 20:11 anjabeth

It's done! Or at least has reached 50K - I might yet make some improvements, but all the basic things - synonym generation, misspelling, and redaction - are working. Code is here, novel is here. I intend to do better documentation before November ends and maybe also make some improvements, but for a busy November, I'm happy with the way it turned out.

anjabeth avatar Nov 27 '16 03:11 anjabeth

Changing title to my favorite phrase from the generated novel: Towers in the Land of Smiling Chimeras

anjabeth avatar Nov 28 '16 21:11 anjabeth

Hah-hah. love it.

MichaelPaulukonis avatar Nov 29 '16 22:11 MichaelPaulukonis