getMatchingAnnotationData {nzilbb.labbcat} | R Documentation |
Gets binary data for annotations that match a particular pattern.
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 that match the given expression on a MIME-typed layer, and retrieves the binary data as files, whose names are returned by the function.
Usage
getMatchingAnnotationData(labbcat.url, expression, path = "")
Arguments
labbcat.url |
URL to the LaBB-CAT instance |
expression |
An expression that determines which annotations match. This must match by either id or layer.id. The expression language is currently not well defined, but is based on JavaScript syntax. e.g.
|
path |
Optional path to directory where the files should be saved. |
Value
The names of the files.
See Also
Examples
## Not run:
## Get mediapipe image annotations for the eleventh second of a transcript
expression = paste(sep="&&",
"layer.id == 'mediapipe'",
"graph.id == 'AP511_MikeThorpe.eaf'",
"start.offset >= 10",
"end.offset < 11")
png.files <- getMatchingAnnotationData(labbcat.url, expression, path="png")
## End(Not run)