B04 Sentiment Analysis Flashcards

1
Q

What is Sentiment Analysis?

A
Sentiment analysis (or
opinion mining) is the
process of extracting an
author’s emotional intent
from text.

The task of sentiment analysis is not only about finding
the opinions about the whole entity but also the opinions about individual attributes of the entity and summarizing them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Sentiment Analysis

Individual Attributes

A

aspects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Sentiment Analysis

The person making the opinion

A

Opinion holder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Sentiment Analysis

The nature of the sentiment expressed

A

orientation or polarity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Sentiment Analysis

The entity or aspect that the opinion is expressed about

A

Opinion target

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Some attributes of sentiment analysis

A
1. Does a piece of text represent a positive
or a negative sentiment?
2. What are the entities being discussed
about, and are they being discussed
about in a positive or negative way?
3. What attributes of the
entity are discussed, and
what are the sentiments
expressed about them?
4. What do people think about this candidate or issue?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Challenges of Sentiment Analysis

A
  • Cultural and demographic differences between authors.
  • Discerning between feature-specific sentiment.
  • Quantifying the hundreds of emotional states which are part of the human condition.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Plutchik emotion
framework classifies 8
evolutionary emotions

A

Anger, Fear, Anticipation, Surprise, Joy, Sadness, Trust, Disgust

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Document Polarity

A
  • Instead of trying to predict emotional states, an easier
    approach is to simply state whether a document is positive or negative.
  • This is referred to as the polarity of a document.
  • The approaches to calculating polarity vary and can either be fairly straightforward or rather sophisticated.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Opinion Words

A

A straightforward approach to calculating polarity involves the use of certain words that are associated with a particular emotional state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Some examples of opinion words

A

Opinion words are often adjectives and adverbs (e.g. “good”, “bad”, “excellent”, etc.), although nouns (e.g., “trash”) or verbs (e.g., “annoy”) are also sometimes used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Opinion or Sentiment Lexicon

A
  • A collection of opinion words along with their polarity form what is known as an opinion or sentiment lexicon.
  • Sentiment lexicons are created either through crowd
    sourcing or by the labor of an author, and then validated by crowd sourcing or research.
  • We can calculate the polarity of a document by simply
    adding up positive words and subtracting negative words.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Bing

A

Categorizes words in
a binary fashion into
positive and negative
categories.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

AFINN

A
Assigns words with a
score that runs
between -5 and 5,
with negative scores
indicating negative
sentiment and
positive scores
indicating positive
sentiment.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

NRC

A
Categorizes words
into categories of
positive, negative,
anger, anticipation,
disgust, fear, joy,
sadness, surprise,
and trust.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Loughran

A
Categorizes words
into categories of
negative, litigious,
positive, uncertainty,
constraining and
superfluous.
17
Q

What does the get_sentiments() function do?

A
  • Returns a specific sentiment lexicon in tidy format.
  • Values for lexicon are either “afinn”, “bing”, “nrc”, or “loughran”.
  • Other than using the get_sentiments(), we can also refer to the sentiments dataset directly.
18
Q

Note with sentiments that:

A
  • Not every English word is represented in the lexicons.
  • The words do not take into account qualifiers. For example “no good” or “not true”.
  • The size of the text analyzed can have an impact on the results.
19
Q

Sentence Level Sentiment Analysis

A

Takes valence shifters into consideration in an effort to do more accurate sentiment analysis.

20
Q

What are valence shifters?

A

Valence shifters are words that have an impact on the

overall polarity of a message.

21
Q

The 4 categories of valence shifters:

A
  1. negators
  2. amplifiers
  3. de-amplifiers
  4. adversative conjunctions
22
Q

Negators

A

Flip the sign of the polarized word.

“I do not love apple pie.”

23
Q

Amplifier

A

Increases or intensifies the impact of a polarized word.

“I really love apple pie.”

24
Q

De-amplifier

A

Reduces the impact of a polarized word.

“I hardly like apple pie.”

25
Q

Adversative Conjunction

A

Overrules the previous clause containing a polarized word.

“I would love to bake apple pie but it’s not worth it.”

26
Q

What does the sentimentr package do?

A
  • Designed to quickly calculate text
    polarity sentiment at the sentence level.
  • Optionally allows for aggregation by
    rows or grouping variable(s).
27
Q

What does the get_sentences() function do?

A
  • Performs sentence boundary disambiguation.

- Returns a list of vectors of sentences.

28
Q

What does the sentiment() function do?

A
  • Approximates the sentiment (polarity) of text by sentence.
  • Several polarity and valence shifter dictionaries can be used.
  • Returns data table of element_id, sentence_id, word_count, and sentiment.
29
Q

What does the sentiment_by() function do?

A
  • Approximates the sentiment (polarity) of text by group.

- Returns data table of element_id, sentence_id, word_count, sd and ave_sentiment.