Skip to content

Instantly share code, notes, and snippets.

@Henelik
Last active April 22, 2019 21:30
Show Gist options
  • Save Henelik/0ed0b4b34a316d28cc116fba40be563f to your computer and use it in GitHub Desktop.
Save Henelik/0ed0b4b34a316d28cc116fba40be563f to your computer and use it in GitHub Desktop.
This small script generates insults inspired by H.P. Lovecraft's novels.
import tracery
from tracery.modifiers import base_english
rules = {
"origin": ["#imperativeVerb.capitalize#, you #multiAdj# #noun#.", "Your #femaleRelative# is #multiAdj.a# #noun#.", "Your #adjective# #femaleRelative# #thirdPersonVerb#.", "Your #femaleRelative# #thirdPersonVerb#, and is #multiAdj.a# #noun#.", "Your #femaleRelative# is #multiAdj.a# #noun#, and #thirdPersonVerb#.", "Your #femaleRelative# and #femaleRelative# are #multiAdj# #noun.s#."],
"femaleRelative": ["grandmother", "mother", "sister", "daughter", "niece", "wife"],
"imperativeVerb": ["be silent", "shut up", "silence", "hold your tongue", "shut your #adjective# face"],
"thirdPersonVerb": ["dances like #adjective.a# #noun#", "was born of #noun.a#", "would be better off as a #multiAdj.a# #noun#", "is consumed by #adjective# madness", "would be better married to a #multiAdj.a# #noun#"],
"noun": ["cretin", "ghoul", "gug", "dhole", "spawn of Tsathoggua", "maggot", "jumble", "poison", "cloud", "cone", "cadaver", "atrocity", "whelp", "slime", "mortal", "corpse", "cancer"],
"multiAdj": ["#adjective#", "#adjective#, #adjective#", "#adjective#, #adjective#, #adjective#"],
"adjective": ["aberrant", "abominable", "absurd", "abysmal", "acidic", "adhesive", "airy", "alien", "ambiguous", "amorphous", "anarchic", "ancient", "angular", "animated", "animalistic", "anomalous", "antediluvian", "appalling", "appendaged", "ashen", "askew", "astounding", "atrocious", "awry", "antiquarian",
"baboon-like", "baleful", "baneful", "bankrupt", "barbarous", "beastly", "bellowing", "bilious", "blasphemous", "bleating", "bloated", "bloodshot", "blubbery", "boiling", "brutish", "bug-eyed", "bulbous",
"cackling", "cadaverous", "cancerous", "cellular", "changeable", "chattering", "coarse", "colorless", "chaotic", "confusing", "congealed", "conical", "convoluted", "corpulent", "corpse-like", "corrupt", "creamy", "criminal", "croaking", "crystalline", "cylindrical", "cyclopean",
"dank", "dark", "deafening", "deathless", "debased", "debauched", "delirious", "decomposing", "deformed", "degenerate", "degraded", "delirious", "depraved", "deranged", "detestable", "deviant", "diabolical", "diffuse", "dire", "discordant", "diseased", "disfigured", "disgusting", "dislocated", "disordered", "dissolved", "distorted", "dreadful", "dropping", "effervescent", "daemonaic", "disproportionate",
"enlarged", "enormous", "enveloping", "evasive", "exaggerated", "excruciating", "extended", "eldritch",
"fabulous", "faceless", "fearful", "fecund", "festering", "fetid", "fibrous", "flowing", "fiendish", "fiery", "filthy", "fish-like", "flabby", "fluctuating", "foaming", "foul", "fractured", "fragrant", "frantic", "fungous",
"gangrenous", "ghastly", "gigantic", "gargantuan", "gibbering", "globular", "gnashing", "glutinous", "gory", "grasping", "grayfish", "greenish", "grim", "grisly", "gross", "gushing",
"hairy", "hapless", "hallucinatory", "hateful", "hazy", "heaving", "hellish", "hideous", "hissing", "horned", "horrible", "howling", "huge", "hybrid",
"ichorous", "idiotic", "illogical", "immaterial", "immense", "immoral", "incoherent", "incomplete", "incongruous", "incredible", "indistinct", "infected", "infernal", "infested", "inhuman", "insane", "insipid", "irrational", "irregular", "iridescent",
"habbering", "jaded", "jangling", "jaundiced", "jellified", "jumbled", "jutting",
"kleptomaniacal",
"leprous", "limp", "limpid", "liquefied", "loathsome", "lumbering", "luminescent", "lumpy", "lunatic", "lurking",
"mad", "maggoty", "malevolent", "malicious", "malignant", "massive", "membranous", "menacing", "metallic", "mildewed", "mindless", "miscarried", "moaning", "molten", "monstrous", "monumental", "morbid", "mortifying", "mottled", "mouldering", "mucky", "mucous", "murmuring", "mutilated",
"nagging", "nameless", "nauseous", "nearsighted", "nebulous", "necromantic", "nigrescent", "noiseless", "nonsensical", "noxious", "numbing",
"obscene", "obsequious", "octopoid", "odious", "odorous", "oily", "ominous", "oozing", "outlandish", "oval", "overgrown", "overripe",
"pagan", "pale", "pallid", "palpable", "palpitating", "palsied", "parasitic", "pasty", "peculiar", "perfidious", "perverse", "phlegmatic", "pitiless", "plastic", "pliable", "poisonous", "porous", "pregnant", "prodigious", "profane", "profuse", "pronged", "protoplasmic", "protuberant", "prurient", "pseudopoidal", "puckered", "pudding-like", "pulsating", "pustular", "putrid",
"quavering", "queasy", "quiescent", "quivering",
"rainbowed", "rectangular", "reeking", "remorseless", "repellent", "reprehensible", "reptilian", "repugnant", "repulsive","rheumy", "rigid", "rough", "rubbery", "rugose",
"sacrilegious", "sallow", "sanguine", "scabby", "scaly", "screaming", "scummy", "seething", "senseless", "sepulchral", "shadow", "shiny", "shrieking", "shuffling", "sickly", "sightless", "sinewy", "singular", "skeletal", "sleepless", "slimy", "slippery", "slithering", "slobbering", "sluggish", "solemn", "sordid", "soundless", "spectral", "spherical", "sponge-like", "stagnant", "sticky", "stupefying", "stupendous", "sulphurous", "syrupy", "Stygian", "squamous",
"teeming", "tentacled", "tenebrous", "terrible", "thickening", "thrashing", "throbbing", "transformed", "transparent", "tubular", "tumultuous", "turbid", "turbulent",
"ugly", "unclean", "uncouth", "undigested", "ungainly", "unknown", "unmasked", "unripe", "unseen", "unspeakable", "unutterable",
"vague", "vaporous", "vast", "vibrating", "vile", "viperous", "viscous", "vivid", "voluminous", "vomiting",
"wailing", "wan", "warped", "waxen", "webbed", "wet", "whirling", "withered", "wormy", "worm-eaten", "wretched", "writhing",
"xenophobic",
"yammering",
"zodiacal", "zymotic"]
}
grammar = tracery.Grammar(rules)
grammar.add_modifiers(base_english)
for i in range(2000):
print(grammar.flatten("#origin#"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment