Adding custom stopwords in R tm

前端 未结 5 1474
梦谈多话
梦谈多话 2020-12-31 07:15

I have a Corpus in R using the tm package. I am applying the removeWords function to remove stopwords

tm_map(abs, removeWords, stop         


        
5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-31 07:38

    stopwords just provides you with a vector of words, just combine your own ones to this.

    tm_map(abs, removeWords, c(stopwords("english"),"my","custom","words")) 
    

提交回复
热议问题