getAnchors: Gets the given anchors in the given transcript.

View source: R/getAnchors.R

getAnchorsR Documentation

Gets the given anchors in the given transcript.

Description

Lists the given anchors in the given transcript.

Usage

getAnchors(labbcat.url, id, anchor.id, page.length = 1000)

Arguments

labbcat.url

URL to the LaBB-CAT instance

id

A transcript ID (i.e. transcript name)

anchor.id

A vector of anchor IDs (or a string representing one anchor ID)

page.length

In order to prevent timeouts when there are a large number of matches or the network connection is slow, rather than retrieving anchors in one big request, they are retrieved using many smaller requests. This parameter controls the number of anchors retrieved per request.

Value

A named list of anchors, with members:

  • id The annotation's unique ID,

  • offset The offset from the beginning (in seconds if it's a transcript of a recording, or in characters if it's a text document)

  • confidence A rating from 0-100 of the confidence of the offset, e.g. 10: default value, 50: force-aligned, 100: manually aligned

See Also

getAnnotations

Examples

## Not run: 
## define the LaBB-CAT URL
labbcat.url <- "https://labbcat.canterbury.ac.nz/demo/"

## Get the first 20 orthography tokens in UC427_ViktoriaPapp_A_ENG.eaf
orthography <- getAnnotations(labbcat.url, "UC427_ViktoriaPapp_A_ENG.eaf", "orthography", 20, 0)

## Get the start anchors for the above tokens
word.starts <- getAnchors(labbcat.url, "UC427_ViktoriaPapp_A_ENG.eaf", orthography$startId)

## End(Not run)


nzilbb.labbcat documentation built on July 26, 2023, 6:08 p.m.