Standardize documents in a corpus.

standardize(corpus, type = c("string_document", "file_document",
  "token_document", "ngram_document"))

# S3 method for corpus
standardize(corpus, type = c("string_document",
  "file_document", "token_document", "ngram_document"))

Arguments

corpus

A corpus, as returned vy corpus.

type

Type to convert to.

Examples

# NOT RUN {
init_textanalysis()

# build document
doc1 <- string_document("First document.")
doc2 <- token_document("Second document.")

corpus <- corpus(doc1, doc2)
standardize(corpus)
# }