quanteda,如何从停词列表中保留一个或几个词供我分析

  • 本文关键字:一个 几个 列表 保留 quanteda r
  • 更新时间 :
  • 英文 :


我如何从我的分析停词列表中保留一个或几个单词呢?这意味着不要把它用作停语,而是允许它们出现在我的分析中。

假设您想要删除单词"one_answers";pero"从西班牙stopwords列表中,您可以创建自己的stopword列表不包括。

new_stopwords <- stopwords::stopwords(language = "es")
list_to_exclude <- c("cuando", "pero")
new_stopwords <- new_stopwords[!new_stopwords %in% list_to_exclude]

接下来你可以像平常一样使用quanteda,并使用new_stopwords列表删除停止词。

最新更新