Package org.cis1200
Class ChatterBotMain
java.lang.Object
org.cis1200.ChatterBotMain
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 posts 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 posts, 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 ChatterBot 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_posts.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_POSTS
This is a path to the CSV file containing the posts. The main method below uses the posts in this file when calling ChatterBot. If you want to run the ChatterBot on the other files we provide, change this path to a different file. (You may need to adjust the POST_COLUMN too.)- See Also:
-
POST_COLUMN
static final int POST_COLUMNColumn in the PATH_TO_POSTS CSV file to read posts from- See Also:
-
PATH_TO_OUTPUT_POSTS
File to store generated posts- See Also:
-
-
Constructor Details
-
ChatterBotMain
public ChatterBotMain()
-
-
Method Details
-
main
Prints ten generated posts to the console so that you can see how your bot is performing!
-