  # Lowercase all the words (to ensure "Sure" and "sure" are matched together)
# Also word_tokenize splits each element in individual tokens
mobyDickText = nltk.word_tokenize(mobyDickTextFull.lower())

# Remove any words that isn't a word
mobyDickText = [word for word in mobyDickText if word[0].isalpha()]

# Get all the stopwords and remove them from the text
stopwords = nltk.corpus.stopwords.words("english")
mobyDickText = [word for word in mobyDickText if word not in stopwords]

# Using nltk find all the frequencies
mobyDickTextFrequency = nltk.FreqDist(mobyDickText)

# See the top 20 most common words
print(mobyDickTextFrequency.most_common(20))

mobyDickTextFrequency.plot(20, title="Top Frequency Content Terms in Moby Dick")

mobyDickText.dispersion_plot(["one", "two", "us"])