我正在使用 R Studio 分析一项调查。我正在使用 tidytext 包中的 Bing Sentiment 词典来执行此操作。
有些词对我的调查没有正确的含义,特别是“温柔”被编码为积极,但我的受访者将“温柔”表示为消极(疼痛)。我知道如何从 bing tibble 中删除一个单词,然后添加一个新单词,但是我怎样才能简单地更改单词的含义呢?
例如:
structure(list(word = c("pain", "tender", "sensitive", "headaches",
"like", "anxiety"), sentiment = c("negative", "positive", "positive",
"negative", "positive", "negative"), n = c(351L, 305L, 279L,
220L, 200L, 196L)), row.names = c(NA, 6L), class = "data.frame")
我希望它看起来像:
structure(list(word = c("pain", "tender", "sensitive", "headaches",
"like", "anxiety"), sentiment = c("negative", "negative", "positive",
"negative", "positive", "negative"), n = c(351L, 305L, 279L,
220L, 200L, 196L)), row.names = c(NA, 6L), class = "data.frame")
谢谢!