Learn R Programming

nzilbb.labbcat (version 1.5-1)

getFragmentAnnotationData: Gets binary annotation data in fragments.

Description

In some annotation layers, the annotations have not only a textual label, but also binary data associated with it; e.g. an image or a data file. In these cases, the 'type' of the layer is a MIME type, e.g. 'image/png'. This function gets annotations between given start/end times on the given MIME-typed layer, and retrieves the binary data as files, whose names are returned by the function.

Usage

getFragmentAnnotationData(
  labbcat.url,
  transcript.id,
  start,
  end,
  layer.id,
  path = "",
  no.progress = FALSE
)

Value

The names of the files.

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.

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.id

The ID of the MIME-typed layer.

path

Optional path to directory where the files should be saved.

no.progress

TRUE to supress visual progress bar. Otherwise, progress bar will be shown when interactive().

See Also

  • getFragmentAnnotations

  • getFragments

  • getSoundFragments

Examples

Run this code
if (FALSE) {
## Get mediapipe image annotations for the eleventh second of a transcript
png.files <- getFragmentAnnotationData(
    labbcat.url, c("AP511_MikeThorpe.eaf"), c(10), c(11), c("mediapipe"), path = "png")
}

Run the code above in your browser using DataLab