让 qdap 放大器应用于否定词

Have qdap amplifiers apply to negated words

R 3.4.3,使用 qdap::polarity(),我想知道是否有办法让放大器应用于否定词而不是实际词本身。在下面的示例中,"love" 是肯定词,"didn't" 是否定词,"definitely" 是放大词。我想让短语 "a" 的极性得分更高,但似乎 "definitely" 正在放大 "love" 而不是 "didn't love".

library(qdap)
text <- c("definitely didn't love", "didn't love", "love")
phrase <- c("a", "b", "c")
df <- data.frame(phrase, text)
polarity(df$text, df$phrase)

  phrase total.sentences total.words ave.polarity sd.polarity stan.mean.polarity
1      a               1           3       -0.115          NA                 NA
2      b               1           2       -0.707          NA                 NA
3      c               1           1        1.000          NA                 NA

提前致谢, -jt

这不是 qdqp::polarity 的工作方式。价词只能放大、缩小或 negate/reverse 标记的极化词。例如,上述问题中的短语 "definitely didn't love" 包含 <amplifier> <negator> <polarized word>。 否定词"didn't",反转正极化词"love"。 放大器"definitely"放大正极化字"love"。它不会放大否定的 "didn't love".