get_region_matrix: Get Matrix with Regions for Strucs.

View source: R/region_matrix.R

get_region_matrixR 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.

Usage

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

Arguments

corpus

a CWB corpus

s_attribute

a structural attribute

strucs

strucs

registry

the registry directory

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()
  )

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