Corpus: Corpus

Description Usage Arguments Format Details Value Core Methods Author(s) See Also Examples

Description

Corpus Entity class for text documents.

Usage

1
skiReport <- Corpus$new(name = "skiReport", purpose = 'Train')

Arguments

name

Character string containing the name for the Corpus object.

purpose

Character string used to indicate how the document will be used, e.g. 'train', 'test'.

note

Character string containing a comment associated with a call to the text method. The texts of the note variable are written to the Corpuss log. This is used to track changes to the text, perhaps made during preprocessing.

Format

An object of class R6ClassGenerator of length 24.

Details

Entity class for text documents with methods for adding text from character vectors.

Value

Corpus object, containing the Corpus text, the metadata and the methods to manage both.

Core Methods

Author(s)

John James, jjames@datasciencesalon.org

See Also

Other Document Classes: Document, Primitive0

Examples

1
2
3
4
5
6
7
8
report <- c("SAN FRANCISCO  — She was snowboarding with her boyfriend when ",
          "she heard someone scream 'Avalanche!'",
          "Then John, 39, saw 'a cloud of snow coming down.'")
avalanche <- Corpus$new(name = 'avalanche', purpose = 'raw')
avalance$content <- report
key <- c('genre', 'author', 'year')
value <- c('weather', 'chris jones', 2018)
avalanche$meta$setDescriptive(key = key value = value)

DecisionScients/NLPStudio documentation built on May 15, 2019, 12:51 p.m.