transcripts_filter {act}R Documentation

Filter all transcripts in a corpus

Description

Filter all transcript objects in a corpus and return the filtered corpus object. It is possible to filter out temporal sections and tiers. In case that you want to select tiers by using regular expressions use the function act::search_makefilter first.

Usage

transcripts_filter(
  x,
  filterTranscriptNames = NULL,
  filterOnlyTheseTranscripts = NULL,
  filterTierNames = NULL,
  filterSectionStartsec = NULL,
  filterSectionEndsec = NULL,
  preserveTimes = TRUE,
  sort = c("none", "tier>startSec", "startSec>tier")
)

Arguments

x

Corpus object;

filterTranscriptNames

Vector of character strings; names of transcripts to remain in the transcripts. If left unspecified, all transcripts will remain in the transcripts.

filterOnlyTheseTranscripts

Vector of character strings; names of transcripts to which filters will be applied. If left unspecified, all transcripts will be filtered.

filterTierNames

Vector of character strings; names of tiers to remain in the transcripts. If left unspecified, all tiers will remain in the transcripts.

filterSectionStartsec

Double, start of selection in seconds.

filterSectionEndsec

Double, end of selection in seconds.

preserveTimes

Logical; Parameter is used if filterSectionStartsec it set. If TRUE start times will be preserved, if FALSE the selection will start from 0.

sort

Logical; Annotations will be sorted: 'none' (=no sorting), 'tier>startSec' (=sort first by tier, then by startSec), 'startSec>tier' (=sort first by startSec, then by tier)

Value

Corpus object;

Examples

library(act)

# Filter corpus to only contain some tiers
all.tier.names <- unique(act::tiers_all(examplecorpus)$name)
some.tier.names <- all.tier.names[1:10]
x <- act::transcripts_filter(examplecorpus, filterTierNames=some.tier.names)
x@history[[length(x@history)]]

[Package act version 1.1.9 Index]