View source: R/getFragmentAnnotations.R
getFragmentAnnotations | R Documentation |
This function gets annotations between given start/end times on given layers. If more than one annotation matches, labels are concatentated together.
getFragmentAnnotations(
labbcat.url,
transcript.id,
participant.id,
start,
end,
layer.ids,
sep = " ",
partial.containment = FALSE,
no.progress = FALSE
)
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(). |
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
getFragments
getSoundFragments
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.