View source: R/getMatchingAnnotations.R
getMatchingAnnotations | R Documentation |
Returns the annotations in the corpus that match the given expression.
getMatchingAnnotations(
labbcat.url,
expression,
page.length = NULL,
page.number = NULL
)
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.
|
page.length |
The maximum number of IDs to return, or null to return all |
page.number |
The zero-based page number to return, or null to return the first page |
The results can be exhaustive, by omitting page.length and page.number, or they can be a subset (a 'page') of results, by given page.length and page.number values.
A list of annotations.
countMatchingAnnotations
## Not run:
## define the LaBB-CAT URL
labbcat.url <- "https://labbcat.canterbury.ac.nz/demo/"
## get all topic annotations whose label includes the word 'quake'
quake.topics <- getMatchingAnnotations(
labbcat.url, "layer.id == 'topic' && /.*quake.*/.test(label)")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.