Package org.cis1200
Class TwitterBotMain
java.lang.Object
org.cis1200.TwitterBotMain
This is the class where everything you've worked on comes together!
You can see that we've provided a path to a CSV file of tweets and the
column from which they can be extracted. When run as an application, this
program builds a Markov Chain from the training data in the CSV file,
generates 10 random tweets, and prints them to the terminal.
There is nothing for you to do in this file -- it already contains the code necessary to put your TwitterBot to work.
When run on the data from the illustrative_example.csv, we get output that looks like:
a table and a banana! and a chair a table and a banana! and a banana! and a table and a chair a chair a chair a banana! and a table and a banana! and a banana! and a banana! and a banana! and a banana? a table and a banana? a banana? a table and a chair a chair a table and a banana! and a table and a chair*
When run on more realistic data from factretreiver_tweets.csv, we get witticisms like * the following (among much junkier random outputs): *
* Octopuses can have belly buttons. * Sometimes a seed pods look like. * Tigers cannot breathe through their mouth. * The average of expensive material is called Chicken Feed. * Dogs are more efficient fliers than about his followers! * Humans can remember ditching school
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
PATH_TO_TWEETS
This is a path to the CSV file containing the tweets. The main method below uses the tweets in this file when calling TwitterBot. If you want to run the TwitterBot on the other files we provide, change this path to a different file. (You may need to adjust the TWEET_COLUMN too.)- See Also:
-
TWEET_COLUMN
static final int TWEET_COLUMNColumn in the PATH_TO_TWEETS CSV file to read tweets from- See Also:
-
PATH_TO_OUTPUT_TWEETS
File to store generated tweets- See Also:
-
-
Constructor Details
-
TwitterBotMain
public TwitterBotMain()
-
-
Method Details
-
main
Prints ten generated tweets to the console so that you can see how your bot is performing!
-