qdapの極性と組み込みレキシコンの探索

Rで学ぶSentiment Analysis

Ted Kwartler

Data Dude

polarity()

主観性レキシコンの例:

単語 極性
Amazing 肯定
Bad 否定
Good 肯定
... ...
Wonderful 肯定
Rで学ぶSentiment Analysis

コンテキストクラスター

コンテキストクラスターの例:
The DataCamp sentiment course is very GOOD for learning.

Rで学ぶSentiment Analysis

コンテキストクラスター(続き)

コンテキストクラスターの例:
The DataCamp sentiment course is very GOOD for learning.

用語 クラス 単語数
Very 増幅語 1
Good 極性語(肯定) 1
その他の単語 中立 7
Rで学ぶSentiment Analysis

コンテキストクラスターの用語集

  • 極性語 - 肯定/否定に関連する語
  • 中立語 - 感情的文脈を持たない語
  • 否定語 - 極性の意味を逆転させる語(例:"not good")
  • 感情価シフター - 感情的文脈に影響する語
    • 増幅語 - 感情の強度を高める語
    • 減衰語 - 感情の強度を下げる語
Rで学ぶSentiment Analysis

コンテキストクラスターのスコアリング

コンテキストクラスターの例:
The DataCamp sentiment course is very GOOD for learning.

用語 クラス 単語数 極性値
Very 増幅語 1 0.8
Good 極性語(肯定) 1 1
その他の単語 中立 7 0
Rで学ぶSentiment Analysis

極性の計算

クラス 単語数 極性値
増幅語 1 0.8
極性語 1 1
中立 7 0
合計 9 1.8

コンテキストクラスターの例
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}}$$

答え: 0.6

Rで学ぶSentiment Analysis

練習しましょう!

Rで学ぶSentiment Analysis

Preparing Video For Download...