Mon Feb 29 15:57:05 PST 2016

Trump Speech

I amused myself today at lunch time writing a Donald Trump speech generator. The generation method analyzes a real Donald Trump speach and computes the probabilities of its word patterns. It then assembles a possible collection of words using selections based on the observed probabilities of the original speech with a random number generator to make choices where there are alternatives.

The resulting 'Markov Chain' approach to text generation was described a while back by Kernighan (and others no doubt). The resulting text has the general style characteristics of its input, but lacks some of the original logic.

But it is an interesting diversion and a nice reminder of the ease with which miniature 'programs' can be shared using webservers, php, and similar 'technologies'.

Here is the address of our Donald Trump speech generator if you would like to give it a go:

http://www.themolecularuniverse.com/TrumpSpeech/

If you are a political speechwriter or aspiring candidate and you find this page helpful, please do not forget this site when you assume power!


Posted by ZFS | Permanent link | File under: general, politics