Refresher on the text mining workflow

Sentiment Analysis in R

Ted Kwartler

Data Dude

So far ...

  • polarity()
    • Valence shifters
  • tidytext, dplyr, tidyr
    • bing, nrc, afinn
  • Visualizations
Sentiment Analysis in R

  Boston map

Sentiment Analysis in R

The text mining workflow

tm workflow

Sentiment Analysis in R

6 defined steps

  1. Define the problem & specific goals
  2. Identify the text
  3. Organize the text
  4. Extract features
  5. Analyze
  6. Draw a conclusion/reach an insight
Sentiment Analysis in R

Step 1: Define your problem

Tips:

  • Be precise
  • Avoid a "scope creep"
  • Iterate and try new methods and/or subjectivity lexicons to ensure some consistency
Sentiment Analysis in R

Step 2: ID your text

Tips:

  • Find appropriate sources (e.g. searching Wikipedia for stock prices may make less sense than examining a stock forum)
  • Follow the terms of service for a site, be mindful of web scraping
  • Text sources affect the language used...become familiar with the source's tone and nuances
Sentiment Analysis in R

Let's practice!

Sentiment Analysis in R

Preparing Video For Download...