Function to create tmCorpus

Share:

Description

Function to create tmCorpus

Usage

1
tmCorpus(x = NULL, ..., package = "base")

Arguments

x

source, for package stylo it supposed to be directory with Corpus files

...

other arguments dependent on package that we use

package

package of reading the data could be tm or stylo

Value

returns tmCorpus object

Examples

1
2
3
4
5
6
7
8
corp <- tmCorpus(c("This is corp", "Document 2"))
corp <- tmCorpus(list("This is corp", "Document 2"))
corp <- tmCorpus(VectorSource(c("This is corp", "Document 2")), package = "tm")
## Not run: 
corp <- tmCorpus(DirSource("directory"), package = "tm")
corp <- tmCorpus("directory", package = "stylo")

## End(Not run)