Skip to content

A system for generating sentences similar to those from the hitchhikers series of books. Based on the emojipasta.club service.

License

Notifications You must be signed in to change notification settings

wasv/towelday

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TowelDay

A system for generating sentences similar to those from the hitchhikers series of books. Based on the emojipasta.club service.

How it works

TowelDay uses Markovify to generate a text model from a corpus of text from the Hitchhikers novels by Douglas Adams.

How to get The Guide

A version of the text with punctuation removed, and one sentence per line is available in the corpus subdirectory of this repository. It was obtained by copying this text into a plain text file, followed by this file and this file.

Sadly, I have only found the first three books in the trilogy. If anyone knows where to find plaintext version of the others, I'll add them to the corpus, and link to them above.

API

TowelDay exposes two RESTful API endpoints, at http://towel.wasv.me/gen/ and http://towel.wasv.me/gen/s/ respectively.

/gen/

/gen/<int:num>/<string:corpus>/ produces a block of text of the specified sentence length. If no length is provided, the default length of 2 is used.

/gen/s/

/gen/s/<int:char>/<string:corpus>/ produces a sentence of the specified maximum character length. If no length is provided, the default length of 140 is used.

About

A system for generating sentences similar to those from the hitchhikers series of books. Based on the emojipasta.club service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 37.4%
  • Python 36.3%
  • CSS 26.3%