Hamilton-NLP
A Natural Language Processing project for focused on the letters and writings associated with American founding father Alexander Hamilton and featured in the Hamilton Broadway Play.
In this project, I decided to utilize the NLP API on the Google Cloud Platform instead of using open source modules.
"Why do you write like you're running out of time?" - Nonstop (From Hamilton play)
- Data
Data was scraped from Founders Online (https://founders.archives.gov/) and include:
- Hamilton's interactions with Aaron Burr.
- Hamilton's interactions with Angelica Church.
- The Federalist Papers.
- Reynolds Pamphlet.
- Thomas Jefferson's Letter of Resignation to George Washington.
- George Washington's Farewell Address.
- The Farmer Refuted.
- Hamilton's writing to The Royal Danish American Gazette.
- .... And a few others.
- Technologies Used
- Jupyter Notebooks
- Python 3.7.1
- Pandas
- Counter
- Google Cloud Language Python API
- Plotly
- Pillow
- WordCloud
- Matplotlib
- NLP techniques Used
- Sentiment Analysis
- Entity Analysis
- Syntax Analysis
- Text Classification
- Graphs Used
- Pie Charts
- Word Clouds
- How to run the notebook:
- Set up Google Cloud Account
- Create a configuration file for Google Cloud Natural Language API and save it at as JSON file
- Make sure all the Technologies above are installed
- Run each cell
- Some Issues you might encounter
- Installing google-cloud does not work you have to specifically install google-cloud-language in order to get the import module to work
- In order to get access to the Google NLP API, you need the credentials or else it won't work. I set it as a variable in my code but there are other ways to do it.
NB: You can listen to the Hamilton Album as you work on it.