我使用情感包开始了一个教程,由于上述内容已从R存储库中删除,因此不得不更改为情感器。
在sentimentr中,我将使用什么函数/库来提供与classify_polarity相同的结果?
以下代码供参考
# classify_polarity using the Naive_Bayes Algorithm
class_pol = classify_polarity(emotions, algorithm ="bayes")
# get the polarity that gives best result
polarity = class_emo[,4]
Error received:
Error in classify_polarity(emotions, algorithm = "bayes") :
could not find function "classify_polarity"
期望的输出是对文本进行正,负或中性分析