Problem 1 – Using Python to analyze historical speeches
History is quite fascinating, and there are many reasons why we would look at writing algorithms to evaluate historical data and contexts.
For this problem, we want to analyze some historical text. In particular, we are going to take a look at Abraham Lincoln's second inaugural speech. Our goal is to find some frequencies of words. There are many reasons why we'd want to perform some straightforward text analysis, especially for historical texts. We may want to compare them, understand underlying themes, and so on.
For our algorithm, we are going to use a fairly simple design using the nltk
package. Because the installation of some of the components is a bit different to what we've done so far, we'll provide some information in case your packages have not been installed.
In the Python shell, if you are in the active console, create a new file and import nltk
after installing the main package...