用情感分析做自我檢視

R 情感分析

Ted Kwartler

Data Dude

用 qdap 的 polarity 篩選語料

library(qdap)
polarity(text.var, grouping.var = NULL)

比較雲:極性流程

R 情感分析

比較 Plutchik 架構中的常見詞

情緒之輪

鯨魚

R 情感分析

Waldo 在哪?哪裡沒有 Waldo?

x <- c("Nicole", "Nick", "Waldo")
grep("Waldo", x)
[1] 3
grepl("Waldo", x)
[1] FALSE FALSE  TRUE
!grepl("Waldo", x)
[1] TRUE  TRUE FALSE
R 情感分析

加入「or」運算子

x <- c("Nicole", "Nick", "Waldo")
grepl("Waldo|Nicole", x)
[1] TRUE FALSE  TRUE
!grepl("Waldo|Nicole", x)
[1] FALSE  TRUE FALSE
R 情感分析

極性混合的堆疊比較

堆疊長條圖

R 情感分析

一起來練習吧!

R 情感分析

Preparing Video For Download...