Political Gibberish Generator

I was playing around with figuring out how to generate random sentences in BASIC! and started with simple words like “cat”, “dog”, “slept” etc… and then I plugged in some politically charged words into my program…

First of all here is the program in BASIC!

REM Start of BASIC! Program
fn.def random®
fn.rtn floor(rnd()*r)+1

fn.def pronoun$()
array.load w$[],“I”,“she”,“he”,“it”,“we”,“nobody”,“everybody"
array.length l,w$[]
fn.rtn w$[random(l)]+” "

fn.def noun$()
array.load w$[],“Obama”,“Trump”,“Hillary”,“candidates”,“people”,“jerks”,“voters”,“Bernie”,“immigrants”,“Middle class”,“terrorists”,“poor people”,“rich people”,“Democrats”,“Republicans”,“Liberals”,“Conservatives"
array.length l,w$[]
fn.rtn w$[random(l)]+” "


fn.def adj$()
array.load w$[],“small”,“a”,“laughing”,“one”,“angry”,“pretty”,“the”,“some”,“wimpy”,“strong”,“no"
array.length l,w$[]
fn.rtn w$[random(l)]+” "

fn.def adv$()
array.load w$[],“slowly”,“easily”,“shortly”,“quietly”,“quickly”,“loudly”,“badly”,“well"
array.length l,w$[]
fn.rtn w$[random(l)]+” "

fn.def verb$()
array.load w$[],“ate”,“slept”,“fell”,“learned”,“won”,“lost”,“talked”,“blamed”,“voted”,“hated”,“loved”,“worked”,“argued”,“accused”,“planned for”,“attacked”,“enjoyed"
array.length l,w$[]
fn.rtn w$[random(l)]+” "

fn.def conj$()
array.load w$[],“and”,“or”,“while”,“until"
array.length l,w$[]
fn.rtn w$[random(l)]+” "

fn.def opt$(s$)
if random(2)=1
fn.rtn s$
fn.rtn ""

fn.def sentence1$()
fn.rtn opt$(adj$())+noun$()+verb$()+opt$(noun$())+opt$(adv$())

fn.def ppt$()
if random(2)=1
fn.rtn opt$(adj$())+noun$()
fn.rtn pronoun$()

fn.def subject$()
fn.rtn ppt$()+opt$(conj$()+ppt$())

fn.def sentence2$()
fn.rtn sentence1$()+opt$(conj$()+sentence1$())

! format it
fn.def sentence$()
fn.rtn s$

for i=1 to 30
s$= sentence$()
print s$
tts.speak s$
next i

text.input all$,all$


… and here is some sample output:

Wimpy immigrants planned for Liberals.

Candidates blamed terrorists.

Middle class blamed loudly.

No Conservatives enjoyed Liberals while immigrants talked terrorists.

Poor people accused rich people slowly while pretty Middle class learned Conservatives.

Conservatives accused voters until pretty Middle class enjoyed.

Wimpy Obama enjoyed until rich people learned.

The Bernie planned for Republicans quietly and Republicans slept.

Wimpy Republicans fell Obama and immigrants planned for Obama.

Conservatives voted candidates or Republicans lost.

Some rich people fell until pretty terrorists voted.

People ate Hillary quickly.

Angry Conservatives ate Democrats easily.

Strong voters enjoyed Liberals or Democrats enjoyed Obama quickly.

Pretty Republicans planned for candidates shortly or Bernie blamed.

Voters won shortly.

Immigrants attacked while Bernie argued.

A jerks lost terrorists easily while people blamed Obama.

Hillary enjoyed.

Conservatives fell while Bernie learned poor people slowly.

Wimpy immigrants hated rich people.

Voters lost well while Bernie voted Conservatives.

Wimpy Liberals fell and laughing Republicans worked easily.

No rich people talked Democrats.

No Conservatives won jerks slowly or voters argued Trump badly.

Middle class slept badly while strong poor people learned candidates easily.

A Conservatives slept terrorists.

Voters hated or Republicans voted Republicans easily.

Terrorists voted while no voters attacked Obama.

Small candidates slept Middle class until jerks argued Trump.

Obviously I have to fix a lot of the grammar (for one thing some verbs like fell or slept shouldn’t have an object and I need to stick in more the’s)… but I thought it was cool that some statements sounded reasonable. Also not sure if it will work as well if I put some verbs in the present tense.


That is so cool, i think your decoding your unconscience, i know we have a lot more going on up there then we think.

1 Like

This post was flagged by the community and is temporarily hidden.


Thanks… yeah I did a lot more work on it today and used richer sentence structures like making sure singular and plural nouns and verbs match, adding clauses etc… It’s beginning to look like something you’d hear on CNN or Fox News :slight_smile:

Here are some more recent samples:

Poor jerks which crazy people loved shortly blamed it and some of the jerks which she fell would love to hear the poor Republicans shortly.

Our Conservatives will attack them well.

The jerks defeated her but the Republicans which they lost well sleep quietly.

The Middle Class argued about Democrats however none of the angry Middle Class accuses it.

We talked.

None of the ugly Republicans talked about the Conservatives but ISIS worked.

Everyone likes us slowly.

They lost.

They loved easily.

Rich people which pretty Hillary talked quickly vote easily while the Republicans hated shortly.

He blames angry Democrats quietly.

Her Democrats voted for young Conservatives.

Smart Obama talked about rich people well however the Trump hated everybody.

Everyone accused while nobody lost quietly.

The ugly terrorists enjoyed it poorly.

Everyone will help everybody.

Poor people will help him.

They accuse old Bernie poorly.

Everybody planned or else they will help some of the Bernie.

We argued while he attacked quickly.

you can see the new .bas code here:

… I will probably publish the apk soon to the Play Store

somebody else did this:


I added a British text-to-speech voice and now it sounds like a mix between Fox News, CNN and the BBC :slight_smile: https://www.youtube.com/watch?v=ZFhyhqifr2A

I am pretty sure it’s available on the Play store now:

The amazon Kindle version has a few bugs that will be fixed when v. 0.6 publishes: