getFragmentAnnotations {nzilbb.labbcat} | R Documentation |
Gets annotations in fragments.
Description
This function gets annotations between given start/end times on given layers. If more than one annotation matches, labels are concatentated together.
Usage
getFragmentAnnotations(
labbcat.url,
transcript.id,
participant.id,
start,
end,
layer.ids,
sep = " ",
partial.containment = FALSE,
no.progress = FALSE
)
Arguments
labbcat.url |
URL to the LaBB-CAT instance |
transcript.id |
The transcript ID (transcript name) of the sound recording, or a vector of transcript IDs. |
participant.id |
The participant ID of the annotations, or a vector of participant IDs. |
start |
The start time in seconds, or a vector of start times. |
end |
The end time in seconds, or a vector of end times. |
layer.ids |
A vector of layer IDs. |
sep |
The separator to use when concatenating labels when multiple annotations are in the given interval. |
partial.containment |
Whether to include annotations that are only partially contained in the given interval. |
no.progress |
TRUE to supress visual progress bar. Otherwise, progress bar will be shown when interactive(). |
Value
A data frame with three columns for each layer in layer.ids:
The annotation labels concatenated together
The start time of the first annotation
The end time of the last annotation
See Also
Examples
## Not run:
## define the LaBB-CAT URL
labbcat.url <- "https://labbcat.canterbury.ac.nz/demo/"
## Get some span-layer intervales
topics <- getMatches(labbcat.url, list(topic = ".*quake.*"))
## Get concantenated word tokens for each topic annotation
topic.tokens <- getFragmentAnnotations(
labbcat.url, topics$Transcript, topics$Participant, topics$topic.start, topics$topic.end,
c("word"))
## End(Not run)