Explore qdap's polarity & built-in lexicon

Sentiment Analysis in R

Ted Kwartler

Data Dude

polarity()

An example subjectivity lexicon:

Word Polarity
Amazing Positive
Bad Negative
Good Positive
... ...
Wonderful Positive
Sentiment Analysis in R

Context cluster

Example context cluster:
The DataCamp sentiment course is very GOOD for learning.

Sentiment Analysis in R

Context cluster, continued

Example context cluster:
The DataCamp sentiment course is very GOOD for learning.

Term Class Word Count
Very Amplifier 1
Good Polarized Term/Positive 1
All other words Neutral 7
Sentiment Analysis in R

Context cluster glossary

  • Polarized Term - words associated with positive/negative
  • Neutral Term - no emotional context
  • Negator - words that invert polarized meaning e.g. "not good"
  • Valence Shifters - words that effect the emotional context
    • Amplifiers - words that increase emotional intent
    • De-Amplifiers - words that decrease emotional intent
Sentiment Analysis in R

Context cluster scoring

Example context cluster:
The DataCamp sentiment course is very GOOD for learning.

Term Class Word Count Polarity Value
Very Amplifier 1 0.8
Good Polarized Term/Positive 1 1
All other words Neutral 7 0
Sentiment Analysis in R

Polarity calculation

Class Word Count Polarity Value
Amplifier 1 0.8
Polarized Term 1 1
Neutral 7 0
Sum 9 1.8

Example Context Cluster
The DataCamp sentiment course is very GOOD for learning.

  1. 1 + 0.8 = 1.8
  2. 1+1+7 = 9
  3. $$\frac{1.8}{\sqrt{9}}$$

Answer: 0.6

Sentiment Analysis in R

Let's practice!

Sentiment Analysis in R

Preparing Video For Download...