Skip to content

Instantly share code, notes, and snippets.

@dsilvadeepal
Last active August 14, 2018 20:02
Show Gist options
  • Save dsilvadeepal/bed337d8d5aa716e9ebbdede730657d2 to your computer and use it in GitHub Desktop.
Save dsilvadeepal/bed337d8d5aa716e9ebbdede730657d2 to your computer and use it in GitHub Desktop.
sms_corpus <- VCorpus(VectorSource(sms_raw$Msg))
sms_dtm <- DocumentTermMatrix(sms_corpus, control =
list(tolower = TRUE,
removeNumbers = TRUE,
stopwords = TRUE,
removePunctuation = TRUE,
stemming = TRUE))
dim(sms_dtm)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment