cl_struc_values: Check whether structural attribute has values

View source: R/cl.R

cl_struc_valuesR Documentation

Check whether structural attribute has values

Description

Structural attributes do not necessarily have values, structural attributes (such as annotations of sentences or paragraphs) may just define regions of corpus positions. Use this function to test whether an attribute has values.

Usage

cl_struc_values(corpus, s_attribute, registry = Sys.getenv("CORPUS_REGISTRY"))

Arguments

corpus

Corpus ID, a length-one character vector.

s_attribute

Structural attribute to check, a length-one character vector.

registry

The registry directory of the corpus.

Value

TRUE if the attribute has values and FALSE if not. NA if the structural attribute is not available.

Examples

cl_struc_values("REUTERS", "places") # TRUE - attribute has values
cl_struc_values("REUTERS", "date") # NA - attribute does not exist

RcppCWB documentation built on July 9, 2023, 7:40 p.m.