Learn R Programming

nzilbb.labbcat (version 0.6-3)

getTranscriptAttributes: Gets transcript attribute values for given transcript IDs.

Description

Gets transcript attribute values for given transcript IDs.

Usage

getTranscriptAttributes(labbcat.url, transcriptIds, layerIds)

Arguments

labbcat.url

URL to the LaBB-CAT instance

transcriptIds

A vector of transcript IDs

layerIds

A vector of layer IDs corresponding to transcript attributes. In general, these are layers whose ID is prefixed 'transcript_', however formally it's any layer where layer$parentId == 'graph' && layer$alignment == 0, which includes 'corpus' as well as transcript attribute layers.

Value

A data frame of attribute value labels.

Examples

Run this code
# NOT RUN {
## define the LaBB-CAT URL
labbcat.url <- "https://labbcat.canterbury.ac.nz/demo/"

## Get language, duration, and corpus for transcripts starting with 'BR'
attributes <- getTranscriptAttributes(labbcat.url,
            getMatchingTranscriptIds(labbcat.url, "id MATCHES 'BR.+'"),
            c('transcript_language', 'transcript_duration', 'corpus'))

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab