【发布时间】:2019-01-14 23:07:23
【问题描述】:
我想使用 quanteda 删除包含停用词的特定列表。
我用这个:
df <- data.frame(data = c("Here is an example text and why I write it", "I can explain and here you but I can help as I would like to help"))
mystopwords <- c("is","an")
corpus<- dfm(tokens_remove(tokens(df$data, remove_punct = TRUE, remove_numbers = TRUE, remove_symbols = TRUE), remove = c(stopwords(language = "el", source = "misc"), mystopwords), ngrams = c(4,6)))
但我收到此错误:
> Error in tokens_select(x, ..., selection = "remove") :
unused arguments (remove = c(stopwords(language = "en", source = "misc"), stopwords1), ngrams = c(4, 6))
在 quanteda 中使用 mystopwords 列表的正确方法是什么?
【问题讨论】: