Entry: Towers in the Land of Smiling Chimeras
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,
- 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.
- 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.
- 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
This sounds great!!
I think this might be the one I'm most excited about. This sounds great
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
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.
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
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.
Changing title to my favorite phrase from the generated novel: Towers in the Land of Smiling Chimeras
Hah-hah. love it.