Code Monkey home page Code Monkey logo

bitter-desert's Introduction

'In the Desert' Mad Libs

Experiments with NLTK, syllable analysis, and a Stephen Crane poem Inspired by @JustToSay

Example Result

python crane_bot.py

In the birch forest hills
I saw a bartender, lithic, beastial
Who, setting on the ground
Held their brow in their hands
And ate of it.

I said, "Is it good, friend?"
It is sour - sour, they answered;
"But I like it
Because it is sour
And because it is my brow"

Twitter Bot

@bitter_desert

Poem Template

In the NOUN (BIOME)
I saw a NOUN, ADJECTIVE, bestial,
Who, VERB (PRESENT PARTICIPLE) upon the ground,
Held POSSESSIVE PRONOUN NOUN in POSSESSIVE PRONOUN hands,
And ate of it.
I said, “Is it good, friend?”
“It is ADJECTIVE (FLAVOR),” PRONOUN answered;

“But I like it
Because it is ADJECTIVE (FLAVOR),
And because it is my NOUN.”

Corpora Collectors

"Creature" replacements

  • Collector searches through WordNet for synonym groups and their hyponyms.
  • Two-syllables only, filtered by textstat library

"Naked" replacements

  • Collects two-syllable adjectives from WordNet

"Squatting" replacements

  • Collects present participle (ending in "ing") of single-syllable verbs using the pattern library, WordNet, and textstat

"Heart" replacements

  • Recursive method that retrieves meronyms of the word "body", as in "the physical structure of a person or animal"
  • Searches for single-syllable meronyms. Decided to go with single-syllable to maintain meter somewhat and avoid terms that sounded too medical

"Bitter" replacements

  • I had a difficult time searching for flavor-specific words with NLTK, so I selected a corpus from some food-related website.

"Desert" replacements

  • Snagged a list from the Minecraft wiki. (It's odd to think about blending the imagery of this poem and Minecraft.)

bitter-desert's People

Contributors

blip-lorist avatar

Stargazers

 avatar

Forkers

monajalal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.