Experiments with NLTK, syllable analysis, and a Stephen Crane poem Inspired by @JustToSay
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"
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.”
- Collector searches through WordNet for synonym groups and their hyponyms.
- Two-syllables only, filtered by textstat library
- Collects two-syllable adjectives from WordNet
- Collects present participle (ending in "ing") of single-syllable verbs using the pattern library, WordNet, and textstat
- 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
- I had a difficult time searching for flavor-specific words with NLTK, so I selected a corpus from some food-related website.
- Snagged a list from the Minecraft wiki. (It's odd to think about blending the imagery of this poem and Minecraft.)