Donald Trump has sure been getting a lot of attention in the media lately. His speeches are pretty funny (or not).

Well now we can all bring out the Donald Trump inside of us with Donald TrumpBot. Just type in some words in the text box below and click ‘Go!’ You’ll have a pre-prepared Donald Trump speech in no time! The output of TrumpBot won’t make sense most of the time, but occasionally it will output something amusing. Some words to try: (trump, mexico, border)

Sampling Method:

Sentence Length:


## Trump it!

Share it!

Type in a seed sentence above.


Wait for the page to load the models. There are 3 sampling methods to choose from. The Markov sampling method takes a seed word (that must be in the dictionary) and will generate the speech word-for-word. The RNN will take in a whole sentence and generate the speech character-by-character. A low “Temperature” for the RNN will cause it to make more likely predictions, while a higher temperature will cause the RNN to take more chances. The RNN Max method, will get the most likely character prediction, while the RNN Rand will have a level of randomness.


RNN built using a 2-layer lstm network, trained on AWS using Keras with a Theano backend. (max-sent-length: 120, hidden-size: 512, batch-size: 64, step: 3). The RNN runs in the browser using RecurrentJS. Many thanks to the developers of Keras and Andrej Karpathy for developing RecurrentJS. Markov chain implementation based on Casey Chu’s blog post. Speech transcripts were extracted from the following websites (let me know if you have more, since I only had 214k characters, and I think the RNN would greatly benefit from more to train on):

comments powered by Disqus
Blog Logo

Baruch Tabanpour