Skip to content

soumilkanwal80/Char-RNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Char-RNN

Description

An implementation of Char-RNN in keras trained on Donald Trump Twitter Archive (http://www.trumptwitterarchive.com/). Also added a command line interface

Installation

  1. Python3
  2. Keras (pip3 install keras)
  3. Tensorflow (pip3 install tensorflow)
  4. NumPy

Usage

Training

python3 train.py --mode train

Tweet Generation

python3 train.py --mode generate

Other commands

  1. --num_sentences -> to set number of sentences to generate
  2. --string -> to set starting string
  3. --num_chars -> to set number of characters present in tweet

Examples

[I, Donald J. Trump, president of the United] States "@NickTiller211: @realDonaldTrump I wish a great time in office. I will be on @foxandfriends at 8:30pm on @FoxNews and the first choice. We need you!...

[Despite the constant negative press cov]erage and the world will be an amazing show. "@DanScavino: I can't wait to see @realDonaldTrump the #Trump in the boardroom in Miami. He was ...

[Despite the constant negative press cov]er the announcement. Get out & VOTE today. I am really good and will not be with you! Great interview with @TheBrodyFile on @FoxNews this mor...

[China] is a great country in the border. #Trump2016 #Trump2016 https://t.co/bDb9JWZng4 "@Scheeker: @realDonaldTrump why did you be able to have you too bad. We need you for a presid...

[Love] the Chinese and have been on everyone who will live the single enemy in the new @politico. "@john_politics: @realDonaldTrump Anywhere you are a fan of the next season. With a

[Love] Democrats and the debt ceiling and confidence in the bad deal to the world of the U.S. Via @BreitbartNews by @KenyaMoore: "Donald Trump: http://t.co/ltbxRuOTt0 "@darennasfort:...

[Love] to Canada to spend the first time and a disaster. Protect our enemy! "@ari_a__an_laurn: @realDonaldTrump please run for President and see you tomorrow at Trump National Doral....