Changes all the nouns in English text to "nurble" using the Natural Language Toolkit. The concept comes from webcomic artist Zach Weiner, who initially brainstormed the idea in this series of tweets, and later made a webcomic out of the idea.
This script uses the Natural Language Toolkit to parse the sentences and tag the parts-of-speech of words in order to replace everything besides the nouns with "nurble".
- Ensure Python is installed.
- Install the Natural Language Toolkit from here: http://nltk.org/install.html
- Run the Python interpreter, and type the following commands:
import nltk
nltk.download()
- Once the "NLTK Downloader" GUI opens, go to the Models tab and download the "punkt" model.
- Close the NLTK Downloader and exit the Python interpreter.
- Run the following to nurble-ize the provided example (Ezekiel 25:17, better known as Samuel L. Jackson's speech from Pulp Fiction):
python nurble.py example.txt