Index
C F G H I L M N R T W
All Classes All Packages
All Classes All Packages
All Classes All Packages
C
- csvFileToTrainingData(String, int) - Static method in class TweetParser
-
Given a path to a CSV file and the column from which to extract the tweet data, computes a training set.
F
- FileLineIterator - Class in <Unnamed>
-
FileLineIterator provides a useful wrapper around Java's provided BufferedReader and provides practice with implementing an Iterator.
- FileLineIterator(String) - Constructor for class FileLineIterator
-
Creates a FileLineIterator for the file located at filePath.
G
- generateTweet(int) - Method in class TwitterBot
-
Generates a tweet of a given length by using the populated MarkovChain.
- generateTweets(int, int) - Method in class TwitterBot
-
Generates a series of tweets using generateTweet().
- getPunctuation() - Static method in class TweetParser
H
- hasNext() - Method in class FileLineIterator
-
Returns true if there are lines left to read in the file, and false otherwise.
- hasNext() - Method in class MarkovChain
-
This method should check if there is another word to retrieve from the Markov Chain based on the current word of our walk.
I
- isPunctuated(String) - Static method in class TwitterBot
-
A helper function to determine if a string ends in punctuation.
L
- ListNumberGenerator - Class in <Unnamed>
-
Produces deterministic numbers by iterating repeatedly over a List
or Integer[] argued in the constructors. - ListNumberGenerator(Integer[]) - Constructor for class ListNumberGenerator
- ListNumberGenerator(List<Integer>) - Constructor for class ListNumberGenerator
M
- main(String[]) - Static method in class TwitterBot
-
Prints ten generated tweets to the console so you can see how your bot is performing!
- MarkovChain - Class in <Unnamed>
-
A Markov Chain is a data structure that tracks the frequency with which one value follows another value in sequence.
- MarkovChain() - Constructor for class MarkovChain
-
No need to write any constructors.
- MarkovChain(NumberGenerator) - Constructor for class MarkovChain
-
No need to write any constructors.
N
- next() - Method in class FileLineIterator
-
Returns the next line from the file, or throws a NoSuchElementException if there are no more strings left to return (i.e.
- next() - Method in class ListNumberGenerator
- next() - Method in class MarkovChain
-
Returns either: (1) the most recent word passed to reset(word), or (2) a successor picked from the probability distribution associated with the word most recently returned by next()
- next(int) - Method in class ListNumberGenerator
- next(int) - Method in interface NumberGenerator
- next(int) - Method in class RandomNumberGenerator
- NumberGenerator - Interface in <Unnamed>
-
This simple interface produces numbers.
R
- RandomNumberGenerator - Class in <Unnamed>
-
Produces random numbers using Java's Random class
- RandomNumberGenerator() - Constructor for class RandomNumberGenerator
- RandomNumberGenerator(long) - Constructor for class RandomNumberGenerator
- randomPunctuation() - Method in class TwitterBot
-
A helper function for providing a random punctuation String.
- reset() - Method in class MarkovChain
-
DO NOT EDIT THIS METHOD.
- reset(String) - Method in class MarkovChain
-
Given a starting String, sets up the Iterator functionality such that: (1) the Markov Chain will begin a walk at start.
T
- train(Iterator<String>) - Method in class MarkovChain
-
Adds a sentence's training data to the MarkovChain frequency information.
- TweetParser - Class in <Unnamed>
-
TweetParser.csvFileToTrainingData() takes in a CSV file that contains tweets and iterates through the file, one tweet at a time, removing parts of the tweets that would be bad inputs to MarkovChain (for example, a URL).
- TweetParser() - Constructor for class TweetParser
- TwitterBot - Class in <Unnamed>
-
This is the class where everything you've worked on thus far comes together! You can see that we've provided a path to a CSV file full of tweets and the column from which they can be extracted.
- TwitterBot(String, int) - Constructor for class TwitterBot
-
Given a column and a path to the csvFile, initializes the TwitterBot by training the MarkovChain with sentences sourced from that CSV file.
- TwitterBot(String, int, NumberGenerator) - Constructor for class TwitterBot
-
Given a column and a path to the csvFile, initializes the TwitterBot by training the MarkovChain with all the sentences obtained as training data from that CSV file.
W
- writeStringsToFile(List<String>, String, boolean) - Method in class TwitterBot
-
GivenĀ a List of Strings, prints those Strings to a file (one String per line in the file).
- writeTweetsToFile(int, int, String, boolean) - Method in class TwitterBot
-
Generates tweets and writes them to a file.
All Classes All Packages