Last week I posted a new Python package to Pypi: Samyro, my toolkit for doing RNN-based character synthesis of new text from given text.
I summarize in tweets the journey to the release of the project. There’s lots more to do, but much of the experimentation now is based on changing the input texts that it reads for comic/artistic/aesthetic effect.
I started out running the PrettyTensor example kit on RNN Shakespeare reading/generation:
When your autogenerated text starts to get ahead of itself…
… you ain't leet yet, bot. pic.twitter.com/A1ZBS2gax9
— Jeremy Kahn is @trochee@dair-community.social (@trochee) March 11, 2016
No, seriously. This is downright Joycean. pic.twitter.com/VEVLHGBmGn
— Jeremy Kahn is @trochee@dair-community.social (@trochee) March 11, 2016
and I quickly discovered that early training passes (slowly) approximate the character distribution of English, in weirdly poetic ways. I decided to focus on the poetry of it:
O wist were a will that will the rery there it the seport
The are the will there but that a miellast is dore.#AIWormtongue— Jeremy Kahn is @trochee@dair-community.social (@trochee) March 18, 2016
This is either Jabberwocky or some serious #LaundryFiles dangerousness pic.twitter.com/bnKgmWa9r1
— Jeremy Kahn is @trochee@dair-community.social (@trochee) March 19, 2016
and found that it was eerily …angry:
@eldang "now good be math it"
… it KNOWS. pic.twitter.com/pCEG7iGwqn
— Jeremy Kahn is @trochee@dair-community.social (@trochee) March 19, 2016
I decided to build out the general idea into a toolkit for text generation, exposing the interesting variables of the toolkit (the sizes of the network, the input text sources, etc) as library (and CLI) control variables.
I named the project after Tristan Tzara, who is a surprisingly awesome figure in the “nihilist side” of the Dada movement (in addition to other things, he fought with the Republicans in the Spanish Civil War, which sounds pretty non-nihilist to me.)
Working on a project I've named after Tristan Tzara https://t.co/6JDx7ekj6i pic.twitter.com/NkXp0EgVS3
— Jeremy Kahn is @trochee@dair-community.social (@trochee) March 25, 2016
and found that continuing to train on Shakespeare got more and more … iambic:
Also, I think I found a lost Henry VI line or three #ProjectTzara pic.twitter.com/tG26M6Pqwl
— Jeremy Kahn is @trochee@dair-community.social (@trochee) March 26, 2016
But then I found that the project name tzara was already taken on Pypi, so I adjusted to use the name “Samyro”, after an earlier pseudonym of Tzara’s. I also started to play with texts besides Shakespeare:
Well, the mad machine is now starting to learn from War and Peace. #Samyro FKA #ProjectTzara pic.twitter.com/86X4B6USWR
— Jeremy Kahn is @trochee@dair-community.social (@trochee) April 6, 2016
and then @eldang started trouble by suggesting TimeCube:
@trochee wuh-oh. This is neat, but "wungutarity" is totally a time-cube… isn't it? pic.twitter.com/6Z4zDRzzzS
— Jeremy Kahn is @trochee@dair-community.social (@trochee) April 6, 2016
I decided it was wise to release the code when it published its own Time Cube manifesto as a snippet:
Intelligence and induced for a singularity is destroyed but to death of the evil ever the death rotation. Evil Singularity
Last one for the morning, I promise. These are so great.
… and don't say it didn't warn you. pic.twitter.com/TVk3WHq8sR— Jeremy Kahn is @trochee@dair-community.social (@trochee) April 6, 2016
I’ve also done some work with War and Peace, with anecdotal evidence that it can learn vocabulary appropriately as well.
it's getting noticeably Russian… pic.twitter.com/hDwAyIb66z
— Jeremy Kahn is @trochee@dair-community.social (@trochee) April 6, 2016
Leave a Reply