get_region_matrix {RcppCWB} | R Documentation |
Get Matrix with Regions for Strucs.
Description
The return value is an integer
matrix with the left and right corpus
positions of the strucs in columns one and two, respectively. For negative
struc values in the input vector, the matrix reports NA
values.
Usage
get_region_matrix(
corpus,
s_attribute,
strucs,
registry = Sys.getenv("CORPUS_REGISTRY")
)
Arguments
corpus |
A CWB corpus (length-one |
s_attribute |
A structural attribute (length-one |
strucs |
Integer vector with strucs. |
registry |
Registry directory with registry file. |
Value
A matrix with integer values indicating left and right corpus positions (columns 1 and 2, respectively).
Examples
y <- get_region_matrix(
corpus = "REUTERS",
s_attribute = "id",
strucs = 0L:5L,
registry = get_tmp_registry()
)
[Package RcppCWB version 0.6.4 Index]