CSourceV: CSourceV

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

Description

CSourceV Sources a Corpus object from a character vector or vectors.

Usage

1

Arguments

name

Optional character vector indicating name for Corpus object.

x

Character vector or a list of character vectors containing text.

collapse

Logical. If true, collapse the character vectors into a single document.

Format

An object of class R6ClassGenerator of length 24.

Details

Sources a Corpus object from a character vector or vectors. Each vector element is treated as a separate document unless the collapse paramter is set to TRUE. If a list is encountered, each list element is treated as a separate document and the vectors are collapsed into a single document within the list structure.

Methods

Author(s)

John James, jjames@datasciencesalon.org

See Also

Other Corpus Source Classes: CSource0, CSourceDir, CSourceFileSet, CSourceQ, CSourceTM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
text <- c("The firm possesses unparalleled leverage in Washington,
thanks in part to its track record of funneling executives into
senior government posts. Even the Trump administration, which
rode a populist wave to electoral victory, is stocked with
Goldman alumni, including Treasury Secretary Steven Mnuchin and
the departing White House economic adviser Gary D. Cohn.",
"Goldman is also an adviser to many of America’s — and the
world’s — largest companies, ranging from stalwarts like Walt
Disney to upstarts like Uber.")

corpus <- CSource$new(x = txt, name = "Goldman")$vector()

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