I am trying to remove whole paragraph that keeps repeating in different documents. It is a disclaimer that goes at the end of an email e.g : " any review, retransmission dissemination or other use of this email...."
docs<-Corpus(VectorSource(text$Description))
toSpace <- content_transformer(function(x, pattern) gsub(pattern, " ", x))
docs <- tm_map(docs, toSpace, "/|@|\\|")
docs <- tm_map(docs, content_transformer(tolower))
docs <- tm_map(docs, removeWords, paste0(
"any ",
"review ",
"retransmission, ",
"dissemination ...)
It is not working. I can't remove individual words as some of them may be valuable...any suggestions?