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.

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
#> [1] TRUE
cl_struc_values("REUTERS", "date") # NA - attribute does not exist
#> [1] NA