Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 913 Bytes

File metadata and controls

12 lines (8 loc) · 913 Bytes

Introduction to Text Analysis

MIT PML Workshops Spring 2021

Materials for the Spring 2021 MIT Political Methodology Lab "Introduction to Text Analysis" Workshop, taught by Andy Halterman and Aidan Milliff.

Contents

  • text_analysis.Rmd: Code (and explanation) for the text analysis demos. We cover 1) sentiment analysis using sentiment dictionaries and tidytext, 2) topic modeling with stm, and 3) regularized logit classification with glmnet.
  • stm.RData: Loads a fitted STM model to save us time (and keep results consistent) during the workshop.
  • text_analysis_slides.pdf: The slides!

Notably missing: train.csv, the data we use in the demos. Register here to get that file via email.