Skip to content

Instantly share code, notes, and snippets.

@zunman
Created September 11, 2016 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zunman/31d564fe72e96ef62742dea6b84a49fa to your computer and use it in GitHub Desktop.
Save zunman/31d564fe72e96ef62742dea6b84a49fa to your computer and use it in GitHub Desktop.
# Create the corpus
MyCorpus <- VCorpus(VectorSource(data$text), readerControl = list(language = "en"))
content(MyCorpus[[1]])
# Some preprocessing
MyCorpus <- tm_map(MyCorpus, content_transformer(tolower))
content(MyCorpus[[1]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment