Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(tm)
- library(XML)
- crudeCorp<-VCorpus(VectorSource(readLines(file.choose())))
- crudeCorp <- tm_map(crudeCorp, stripWhitespace)
- library(SnowballC)
- crudeCorp <- tm_map(crudeCorp, stemDocument)
- crudeCorp <- tm_map(crudeCorp, stripWhitespace)
- crudeCorp<-tm_map(crudeCorp, content_transformer(tolower))
- crudeCorp<-tm_map(crudeCorp, removeWords, stopwords("english"))
- myStopwords <- c(stopwords("english"), "can", "will","go","also","get","much","since","way","even","just")
- myStopwords <- setdiff(myStopwords, c("will","can"))
- crudeCorp <- tm_map(crudeCorp, removeWords, myStopwords)
- crudeCorp<-tm_map(crudeCorp,removeNumbers)
- crudeDtm <- TermDocumentMatrix(crudeCorp, control=list(removePunctuation=T))
- 1. The masks are fake!! I even found a bug in one of them!!! I need refund!
- 2. so i thought nothing of it.
- 3. I tried a few days, only one out of five felt comfortable on my face.
- (skip)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement