Argument ngrams not used

不羁岁月 提交于 2020-01-24 20:56:06

问题


I use quanteda for text analysis

I use this commands

corp_df2 <- 
    tokens(df$text,
           remove_punct = TRUE, 
           remove_numbers = TRUE, 
           remove_symbols = TRUE) %>%
    tokens_remove(pattern = stopwords(source = "smart")) %>%
      tokens_wordstem()

corp_df3 <- dfm(corp_df2) %>%
    dfm_trim(min_termfreq = 0.95, termfreq_type = "quantile") 

myDfm <- dfm(corp_df3, ngrams = c(1,3))

But I receive this error

Argument ngrams not used.

How can I use the command to receive ngrams?

来源:https://stackoverflow.com/questions/58261741/argument-ngrams-not-used

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!