expressionFromAttributeValue: Generates a query expression for matching a single-value...

View source: R/expressionFromAttributeValue.R

expressionFromAttributeValueR Documentation

Generates a query expression for matching a single-value transcript/participant attribute, for use with getMatches

Description

This function generates a query expression fragment which can be passed as the transcript.expression or participant.expression parameter of getMatches, (or the expression parameter of getMatchingTranscriptIds or getMatchingParticipantIds) using a list of possible values for a given attribute.

Usage

expressionFromAttributeValue(transcript.attribute, values, not = FALSE)

Arguments

transcript.attribute

The transcript attribute to filter by.

values

A list of possible values for transcript.attribute.

not

Whether to match the given IDs (FALSE), or everything except the given IDs.

Details

The attribute defined by transcript.attribute is expected to have exactly one value. If it may have multiple values, use expressionFromAttributeValues instead.

Value

A transcript query expression which can be passed as the transcript.expression parameter of getMatches or the expression parameter of getMatchingTranscriptIds

See Also

  • expressionFromAttributeValues

  • expressionFromTranscriptTypes

  • expressionFromIds

  • getMatches

Examples

## Not run: 
## Perform a search
languages <- c("en","en-NZ")
results <- getMatches(labbcat.url, list(segment="I"),
                      transcript.expression = expressionFromAttributeValue(
                            "transcript_language", languages))

## End(Not run)

nzilbb.labbcat documentation built on June 8, 2025, 10:57 a.m.