cl_reworkR Documentation

Experimental low-level CL access.

Description

Set of functions with same functionality as cl_* functions to improve the ease of writing code.

Usage

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

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

p_attr_size(p_attr)

s_attr_size(s_attr)

p_attr_lexicon_size(p_attr)

cpos_to_struc(cpos, s_attr)

cpos_to_str(cpos, p_attr)

cpos_to_id(cpos, p_attr)

struc_to_cpos(struc, s_attr)

struc_to_str(struc, s_attr)

regex_to_id(regex, p_attr)

str_to_id(str, p_attr)

id_to_freq(id, p_attr)

id_to_cpos(id, p_attr)

cpos_to_lbound(cpos, s_attr)

cpos_to_rbound(cpos, s_attr)

Arguments

corpus

ID of a CWB corpus (length-one character vector).

s_attribute

A structural attribute (length-one character vector).

registry

Registry directory.

p_attribute

A positional attribute (length-one character vector).

p_attr

A externalptr referencing a p-attribute.

s_attr

A externalptr referencing a p-attribute.

cpos

An integer vector of corpus positions.

struc

A length-one integer vector with a struc.

regex

A regular expression.

str

A character vector.

id

An integer vector with token ids.