transformIntoCorpus: Transforms the input into a Corpus object

View source: R/transformIntoCorpus.R

transformIntoCorpusR Documentation

Transforms the input into a Corpus object

Description

Takes the given input of characters and transforms it into a Corpus. The input is checked to match the expected class and format.

Usage

transformIntoCorpus(x)

Arguments

x

A list, data.frame or vector consisting of characters

Value

The generated Corpus

Note

Factors are automatically casted into characters but with printing a warning

See Also

preprocessCorpus for further preprocessing, analyzeSentiment for subsequent sentiment analysis

Examples

transformIntoCorpus(c("Document 1", "Document 2", "Document 3"))
transformIntoCorpus(list("Document 1", "Document 2", "Document 3"))
transformIntoCorpus(data.frame("Document 1", "Document 2", "Document 3"))

SentimentAnalysis documentation built on Aug. 24, 2023, 1:07 a.m.