Skip to content

Instantly share code, notes, and snippets.

@jrladd
jrladd / unhelpful_gloss.py
Created December 12, 2015 21:32
This short script uses TextBlob and WordNet to add random glosses to almost every word in a poem. The effect is of a very diligent but overzealous grad student.
#! /usr/bin/env python
from textblob import TextBlob, Word
import random, sys
file = sys.argv[1]
def gloss_line(line):
line = TextBlob(line)
glosses = []