import random class verb(object): def __init__(self,plural,singular,tense): self.singular = singular self.plural = plural self.tense = tense class noun(object): def __init__(self,word,person,number): self.word = word self.person = person self.number = number class phrase(object): def __init__(self, present, past, active, dobject): self.present = present self.past = past self.active = active self.dobject = dobject auxilliary_verbs = [ verb("will", "will", "present"), verb("could", "could", "present"), verb("are", "is", "active"), verb("have", "has", "past") ] subjects = [ noun("new labour",3,1), noun("brussels",3,1), noun("the bbc",3,1), noun("the e.u.",3,1), noun("the euro",3,1), noun("the loony left",3,1), noun("the unions",3,2), # May be a bit quaint this one noun("channel 4",3,1), noun("your local council",3,1), noun("the french",3,2), noun("the germans",3,2), noun("the poles",3,2), noun("brussels bureaucrats",3,2), noun("muslims",3,2), noun("immigrants",3,2), # Except those from the UK to Spain & the Algarve of course noun("teachers",3,2), noun("the unemployed",3,2), noun("gypsies",3,2), noun("yobs",3,2), noun("hoodies",3,2), noun("feral children",3,2), # They hate children *and* paedophiles FFS, make your minds up noun("chavs",3,2), noun("the p.c. brigade",3,2), noun("asylum seekers",3,2), # Nicer way of saying 'brown people' noun("gays",3,2), noun("lesbians",3,2), noun("single mothers",3,2), noun("paedophiles",3,2), noun("gordon brown",3,1), noun("alistair darling",3,1), noun("jacqui smith",3,1), noun("teenage sex",3,1), noun("political correctness",3,1), noun("health & safety",3,1), noun("feminism",3,1), noun("the metric system",3,1), # For fuck's sake noun("dumbing-down",3,1), # noun("rip-off britain",3,1), noun("the internet",3,1), noun("facebook",3,1), # I CAN'T BELIEVE THE MAIL ACTUALLY SAID FACEBOOK COULD GIVE YOU CANCER, FOR REAL noun("filth on television",3,1), noun("the human rights act",3,1), noun("the nanny state",3,1), noun("cancer",3,1), # Could cancer give you cancer? noun("binge drinking",3,1), noun("the MMR jab",3,1), # Murdering cunts noun("the house price crash",3,1) # Hahahaha ] # Transitive phrases (i.e. bad thing they do) transitive_phrases = [ phrase("give", "given", "giving", "cancer"), phrase("give", "given", "giving", "cancer"), # Have it twice as they're so bloody obsessed by it phrase("infect", "infected", "infecting", "with AIDS"), phrase("give", "given", "giving", "swine flu"), phrase("make", "made", "making", "obese"), phrase("give", "given", "giving", "diabetes"), phrase("make", "made", "making", "impotent"), phrase("turn","turned","turning","gay"), # Cunts phrase("scrounge off","scrounged off","scrounging off",""), phrase("tax", "taxed", "taxing", ""), phrase("cheat", "cheated", "cheating", ""), phrase("defraud", "defrauded", "defrauding", ""), phrase("steal from","stolen from","stealing from",""), phrase("burgle","burgled","burgling",""), phrase("devalue","devalued","devaluing",""), phrase("rip off","ripped off","ripping off",""), phrase("molest","molested","molesting",""), phrase("have sex with","had sex with","having sex with",""), phrase("impregnate", "impregnated", "impregnating", ""), phrase("steal the identity of","stolen the identity of","stealing the identity of",""), phrase("destroy","destroyed","destroying",""), phrase("kill","killed", "killing",""), phrase("ruin","ruined","ruining",""), phrase("hurt","hurt", "hurting","") ] dobjects = [ "the british people", "the middle class", "middle britain", # Cunts "england", "hard-working families", "homeowners", "pensioners", "drivers", "taxpayers", "taxpayers' money", "house prices", "property prices", # Hahahahahahahaa "britain's farmers", "the countryside", "british justice", "british sovereignty", "common sense and decency", "the queen", # God bless 'er "the royal family", "the church", "you", "your mortgage", "your pension", "your daughters", "your children", "your house", "your pets", "the conservative party", # FAIL "the memory of diana", "Britain's swans", # This always stays "Cadbury" # iconic! ]; def match_verb_and_subject(subject,verb): if ((subject.number == 1) and (subject.person == 3)): return verb.singular else: return verb.plural def match_verb_and_tense(verb,phrase): if (verb.tense == "present"): return phrase.present elif (verb.tense == "past"): return phrase.past elif (verb.tense == "active"): return phrase.active def generate(): subject = random.choice(subjects) phrase = random.choice(transitive_phrases) verb = random.choice(auxilliary_verbs) dobject = random.choice(dobjects) sentence = [match_verb_and_subject(subject, verb), subject.word, match_verb_and_tense(verb,phrase), dobject] if (phrase.dobject != ""): sentence.append(phrase.dobject) s = " ".join(sentence).upper() return s + "?"