Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An End of Tarred Twine #147

Open
samplereality opened this issue Dec 1, 2019 · 0 comments
Open

An End of Tarred Twine #147

samplereality opened this issue Dec 1, 2019 · 0 comments

Comments

@samplereality
Copy link

An End of Tarred Twine

An End of Tarred Twine is a randomly generated Twine hypertext version of Moby Dick. It's interactive and nonlinear and serendipitously fun. But good luck following the story!

I created this Twine version of Moby Dick for National Novel Generation Month (NaNoGenMo) 2019. The heart of the project is a Python program that breaks Herman Melville's 1851 masterpiece into 2,463 individual Twine passages. Next, the program uses the SpaCy natural language processing module to identify several named entities and verbs in each passage, and then link them randomly to one of the other over 2,463 passages. The program generates a twee file (twee being the equivalent of Twine markup). Finally, I use the command line compiler Tweego to generate the actual Twine HTML file. The source code is all on Github.

Live version: https://fugitivetexts.net/tarredtwine/index.html

Necessary components are:

  • A cleaned up unicode text version of Moby Dick
  • Python with the regex, random, and spaCy modules
  • Tweego
  • Plus, I did some cleanup of the final twee code in Notepad++.

Some stats:

  • 250,051 words
  • 2463 passages (or nodes)
  • 6476 links between the passages
  • 2.63 average links on any single passage

Screenshot:

tarredTwineCover

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants