For NaNoGenMo 2017.
Star Trek: Nemesis brings to an end SPOILER not only the story of the U.S.S. Enterprise-E and her crew, but that of lieutenant commander Data as well. The film ends on a hopeful note, however, with the technologically inferior B-9 (B-4 in the movie itself) android, into which Data had previously copied all of his own memories, displaying some of Data’s mannerisms.
B-9 Indifference generates a Star Trek: The Next Generation script of arbitrary length using Markov chains trained on the show’s episode and movie scripts. It is intended to simulate B-9 reconstructing Data’s memories as best as its poor programming can manage.
To generate the output yourself you can type python b9_app.py
in the command line and you will
be prompted for the desired word count. B-9 Indifference then:
- Trains all the relevant models.
- Picks a random cast member to begin.
- Generates a random number of sentences for that cast member.
- Selects the next cast member most likely to follow the first.
- Rinses and repeats, incrementing the stardate and adding more text until the word limit is hit.
- Outputs the final script to an HTML file.
You can see the latest output here, but I don’t recommend you read through it in its entirety. Instead, I’ve picked out some key pieces below:
- The original TNG series and film scripts were sourced from Star Trek Minutiae, which has a disclaimer that I should include here as well: this project is not endorsed, sponsored or affiliated with CBS Studios Inc. or the Star Trek franchise. This project is intended for personal use only, under “fair use” principles of United States copyright law.
- The Markov chains were trained using the excellent Markovify.
- The typeface used in the output file is Swiss 911 Std Ultra Compressed, by Bitstream, licensed from MyFonts.
PICARD: I don’t know if all this has made sense to you, but I wanted you to know what kind of man he was. In his quest to be more like us, he helped show us what it means to be human.