s_attr_regions {RcppCWB} | R Documentation |
Get regions defined by a structural attribute
Description
Get all regions defined by a structural attribute. Unlike
get_region_matrix()
that returns a region matrix for a defined subset of
strucs, all regions are returned. As it is the fastest option, the function
reads the binary *.rng file for the structural attribute directly. The corpus
library (CL) is not used in this case.
Usage
s_attr_regions(
corpus,
s_attr,
registry = Sys.getenv("CORPUS_REGISTRY"),
data_dir = corpus_data_dir(corpus = corpus, registry = registry)
)
Arguments
corpus |
A length-one |
s_attr |
A length-one |
registry |
A length-one |
data_dir |
The data directory of the corpus. |
Value
A two-colum matrix
with the regions defined by the structural
attribute: Column 1 defines left corpus positions and column 2 right corpus
positions of regions.
Examples
s_attr_regions("REUTERS", s_attr = "id", registry = get_tmp_registry())
[Package RcppCWB version 0.6.4 Index]