Skip to content

An API for generating stories by using smaller, pre-made human content

License

Notifications You must be signed in to change notification settings

tra38/Prolefeed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##What is Prolefeed?

Prolefeed is a Ruby Gem that provides a simple API for generating stories by using smaller, pre-made human content. You simply provide the content, and Prolefeed will organize it into a fashion pleasing to the human being. You can run Prolefeed over and over to find different versions of your story, and choose the one that you want.

##Code Examples

Examples of code are located in the examples folder. They include a toy example, the Ruby file used to generate this documentation, and an example 'hot take'. You may also look at the 'History of Real-World Usage' section to see examples of this code being used in production.

##History of Real-World Usage

The predecessor to the 'Prolefeed' algorithm ('text_arrangement.rb') was built during NaNoGenMo 2015, in the project (NaNoGenMo Dada 2.0) 2.0. The project was able to successfully turn a longform journalistic article into a computer-generated story, simply by shuffling paragraphs.

Prolefeed 1.0 was developed to write a short story "The Last Laugh". You may view the source code of the project (and the final, generated story) here.

Prolefeed 2.0 was developed for the blog post 'The Case Against Artificial Intelligence'. In this version, the 'bookend' concept is introduced, to help provide more organization to the blog post in question. The source code is here. It is this version of the code that has been packaged into a Ruby Gem.

Finally, the documentation for this project was generated using Prolefeed. Check it out here.

##Install

Command Line

gem install prolefeed

Gemfile

gem 'prolefeed'

##Credits Inspiration: This algorithm was inspired by Fake Press Coverage of NaNoGenMo: A Novel.

Name: George Orwell invented the world 'Prolefeed' to describe the computer-generated work produced in Oceania. According to Wikipedia, prolefeed is:

the deliberately superficial literature, movies and music that were produced by Prolesec, a section of the Ministry of Truth, to keep the "proles" (i.e., proletariat) content and to prevent them from becoming too knowledgeable

This algorithm is best suited for generating this type of literature in Oceania. The algorithm's stories are simply the random arrangement of human-written passages, yet it 'seems' meaningful and evocative to a human being because of apophenia...the human tendency for seeing patterns where none exist.

Algorithm Writing: Tariq Ali wrote the algorithm, and is serving as the maintainer of this gem.

##Usage

require 'prolefeed'

prolefeed = Prolefeed.new

prolefeed.add_to_bookends("THESIS OF PAPER")
prolefeed.add_to_bookends("SUMMARY OF PAPER")

prolefeed.add_to_story("Paragraph #1")
prolefeed.add_to_story("Paragraph #2")
prolefeed.add_to_story("Paragraph #3")

final_story = prolefeed.generate.join("\r\n")

puts final_story

# Example of Generated Story:

#THESIS OF PAPER
# Paragraph #2
# Paragraph #1
# Paragraph #3
# SUMMARY OF PAPER

#Second Example:

# SUMMARY OF PAPER
# Paragraph #3
# Paragraph #1
# Paragraph #2
# THESIS OF PAPER

'Bookends' are the introductory and conclusion paragraphs of content. These paragraphs serve as the 'frame' that structures and organizes the rest of your content. The generator will only pick two bookends to use, and randomize its order in the essay. It is recommended to have two bookends.

The 'Story' refers to the rest of your content. All paragraphs you add to the story will be shuffled and presented to the user in different orders.

Though the algorithm is simple, it is applicable to many situations:

  • Easily create 'evocative' fiction that avoids plot in favor of description and theme

  • Repackage your existing content into a coherent and organized blog post (surrounded by bookends).

  • Turn your listicle into 'respectable' longform journalism, simply by removing the bullet points and adding more description to your story paragraphs.

  • And so much more!

You may rerun the programs multiple times to see different versions of your same story. Then choose the one you want and publish it.

##License This work is open source and provided under the terms of the Unlicense. This is because this algorithm is so basic that it has already been invented (and re-invented) countless times. Honestly, it really shouldn't work at all...and yet, to my horror, it does.

About

An API for generating stories by using smaller, pre-made human content

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages