transcripts_add {act}R Documentation

Add transcripts to a corpus

Description

Add a single or multiple transcript objects to a corpus object.

Usage

transcripts_add(
  x,
  ...,
  skipDuplicates = FALSE,
  createFullText = TRUE,
  assignMedia = TRUE
)

Arguments

x

Corpus object

...

transcript object, list of transcript objects, corpus object.

skipDuplicates

Logical; If FALSE double transcripts will be renamed to make the names unique, if TRUE double transcripts will not be added.

createFullText

Logical; if TRUE full text will be created.

assignMedia

Logical; if TRUE the folder(s) specified in @paths.media.files of your corpus object will be scanned for media.

Details

The name of the transcript objects have to be unique in the act package. The @name attribute of each transcript object will be set as identifier in the list of transcripts in the corpus object. By default, transcripts with non unique names will be renamed. If you prefer to import.skip.double.files, set the parameter skipDuplicates=TRUE. Skipped/renamed transcripts will be reported in

Value

Corpus object

Examples

library(act)

# get one of the already existing transcript in the examplecorpus
newtrans <- examplecorpus@transcripts[[1]]

# add this transcript to the examplecorpus
newcorpus <- act::transcripts_add(examplecorpus, newtrans)

# compare the two corpus objects
length(examplecorpus@transcripts)
length(newcorpus@transcripts)

names(examplecorpus@transcripts)
names(newcorpus@transcripts)

[Package act version 1.1.9 Index]