统计 NRC 情感
tidytext 包中包含的第 4 个词典是 nrc 词典。让我们先从统计各类情感的词频开始。
本练习是课程的一部分
R 文本分析入门
练习说明
- 这一步通常我已为您完成,但这次请先加载
tidyverse和tidytext包。 - 统计
nrc中每种情感所对应的词语数量。 - 将统计结果按降序排列。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Load the tidyverse and tidytext packages
___(___)
___(___)
# Count the number of words associated with each sentiment in nrc
___(___) %>%
___(___) %>%
# Arrange the counts in descending order
___(___)