checks: Check Input to Rcpp Functions.

Description Usage Arguments

Description

A set of functions to check whether the input values to the Rcpp wrappers for the C functions of the Corpus Workbench potentially causing crashes are valid. These auxiliary functions are called by the cl_ and cqp_ functions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
check_registry(registry)

check_corpus(corpus, registry)

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

check_p_attribute(p_attribute, corpus,
  registry = Sys.getenv("CORPUS_REGISTRY"))

check_strucs(corpus, s_attribute, strucs, registry)

check_region_matrix(region_matrix)

check_cqp_query(query)

check_cpos(corpus, p_attribute = "word", cpos,
  registry = Sys.getenv("CORPUS_REGISTRY"))

check_id(corpus, p_attribute, id, registry = Sys.getenv("CORPUS_REGISTRY"))

Arguments

registry

path to registry directory

corpus

name of a CWB corpus

s_attribute

a structural attribute

p_attribute

a positional attribute

strucs

strucs (indices of structural attributes)

region_matrix

a region matrix

query

a CQP query

cpos

vector of corpus positions

id

id (encoded p-attribute), integer value


RcppCWB documentation built on Aug. 11, 2018, 1:04 a.m.